Skip to content

Commit

Permalink
minor follow up for 8267 (pantsbuild#8277)
Browse files Browse the repository at this point in the history
  • Loading branch information
wisechengyi authored Sep 11, 2019
1 parent 8a2d438 commit 311923f
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions contrib/node/src/python/pants/contrib/node/tasks/node_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,11 @@ def execute(self):
return

node_paths = self.context.products.get_data(NodePaths)
# This is required even if node does not need `compile_classpaths` because some downstream
# tasks requires `runtime_classpath` to be initialized correctly with `compile_classpaths`
compile_classpath = self.context.products.get_data('compile_classpath')
if compile_classpath is not None:
init_func = compile_classpath.copy
else:
init_func = ClasspathProducts.init_func(self.get_options().pants_workdir)
runtime_classpath = self.context.products.get_data('runtime_classpath', init_func)
# This is required even if node does not need `compile_classpaths` because certain downstream
# tasks require `runtime_classpath` to be initialized correctly with `compile_classpaths`
compile_classpath = self.context.products.get_data('compile_classpath',
init_func=ClasspathProducts.init_func(self.get_options().pants_workdir))
runtime_classpath = self.context.products.get_data('runtime_classpath', compile_classpath.copy)

bundleable_js_product = self.context.products.get_data(
'bundleable_js', init_func=lambda: defaultdict(MultipleRootedProducts))
Expand Down

0 comments on commit 311923f

Please sign in to comment.