Skip to content

Commit

Permalink
fix(builtin): write stdout/stderr to correct path under chdir (#2681)
Browse files Browse the repository at this point in the history
fixes #2680
  • Loading branch information
alexeagle committed May 26, 2021
1 parent 1ce9dce commit 99760a5
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 99760a5

Please sign in to comment.