Skip to content

Commit

Permalink
fix(builtin): write stdout/stderr to correct path under chdir (bazel-…
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle authored and twheys committed Jan 13, 2022
1 parent e4f3505 commit b71f9d9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/node/launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ for ARG in ${ALL_ARGS[@]+"${ALL_ARGS[@]}"}; do
# Supply custom linker arguments for first-party dependencies
--bazel_node_modules_manifest=*) MODULES_MANIFEST="${ARG#--bazel_node_modules_manifest=}" ;;
# Captures stdout of the node process to the file specified
--bazel_capture_stdout=*) STDOUT_CAPTURE="${ARG#--bazel_capture_stdout=}" ;;
--bazel_capture_stdout=*) STDOUT_CAPTURE="${PWD}/${ARG#--bazel_capture_stdout=}" ;;
# Captures stderr of the node process to the file specified
--bazel_capture_stderr=*) STDERR_CAPTURE="${ARG#--bazel_capture_stderr=}" ;;
--bazel_capture_stderr=*) STDERR_CAPTURE="${PWD}/${ARG#--bazel_capture_stderr=}" ;;
# Captures the exit code of the node process to the file specified
--bazel_capture_exit_code=*) EXIT_CODE_CAPTURE="${ARG#--bazel_capture_exit_code=}" ;;
# Disable the node_loader.js monkey patches for require()
Expand Down
1 change: 1 addition & 0 deletions internal/node/test/chdir/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ npm_package_bin(
args = ["/".join([".."] * _package_segments + ["$@"])],
chdir = package_name(),
data = ["_package.json"],
stdout = "do_copy.log",
tool = ":tool_cp",
)

Expand Down
1 change: 1 addition & 0 deletions internal/node/test/chdir/cp.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ function mkdirp(p) {

mkdirp(dirname(dest));
fs.copyFileSync('_package.json', dest);
console.log('Copied _package.json ->', dest);

0 comments on commit b71f9d9

Please sign in to comment.