Skip to content

Commit

Permalink
fix: don't use hard-coded aspect_rules_js workspace name in path to n…
Browse files Browse the repository at this point in the history
…ode patches entry (#205)
  • Loading branch information
gregmagolan authored Jun 14, 2022
1 parent f735747 commit d5eab0c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions js/private/js_binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ def _bash_launcher(ctx, entry_point_path, log_prefix_rule_set, log_prefix_rule,
"{{node}}": _target_tool_short_path(node_bin.target_tool_path),
"{{rlocation_function}}": BASH_RLOCATION_FUNCTION,
"{{workspace_name}}": ctx.workspace_name,
"{{node_patches_entry_short_path}}": ctx.file._node_patches_entry.short_path,
}

ctx.actions.expand_template(
Expand Down
2 changes: 1 addition & 1 deletion js/private/js_binary.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ done
export JS_BINARY__FS_PATH_ROOTS="$execroot:$RUNFILES"
if [ -z "${JS_BINARY__DISABLE_NODE_PATCHES:-}" ] && [ "${JS_BINARY__FS_PATH_ROOTS:-}" ]; then
logf_debug "adding node fs patches with roots: %s" "$JS_BINARY__FS_PATH_ROOTS"
NODE_OPTIONS+=( "--require" "$RUNFILES/aspect_rules_js/js/private/node-patches/register" )
NODE_OPTIONS+=( "--require" "$RUNFILES/{{workspace_name}}/{{node_patches_entry_short_path}}" )
fi

# Put bazel managed node on the path
Expand Down
2 changes: 1 addition & 1 deletion js/private/test/shellcheck_launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ done
export JS_BINARY__FS_PATH_ROOTS="$execroot:$RUNFILES"
if [ -z "${JS_BINARY__DISABLE_NODE_PATCHES:-}" ] && [ "${JS_BINARY__FS_PATH_ROOTS:-}" ]; then
logf_debug "adding node fs patches with roots: %s" "$JS_BINARY__FS_PATH_ROOTS"
NODE_OPTIONS+=( "--require" "$RUNFILES/aspect_rules_js/js/private/node-patches/register" )
NODE_OPTIONS+=( "--require" "$RUNFILES/aspect_rules_js/js/private/node-patches/register.js" )
fi

# Put bazel managed node on the path
Expand Down

0 comments on commit d5eab0c

Please sign in to comment.