diff --git a/internal/node/launcher.sh b/internal/node/launcher.sh index 6aa67c1722..ef168eb583 100644 --- a/internal/node/launcher.sh +++ b/internal/node/launcher.sh @@ -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() diff --git a/internal/node/test/chdir/BUILD.bazel b/internal/node/test/chdir/BUILD.bazel index 1f75e1c49d..aa772f007b 100644 --- a/internal/node/test/chdir/BUILD.bazel +++ b/internal/node/test/chdir/BUILD.bazel @@ -25,6 +25,7 @@ npm_package_bin( args = ["/".join([".."] * _package_segments + ["$@"])], chdir = package_name(), data = ["_package.json"], + stdout = "do_copy.log", tool = ":tool_cp", ) diff --git a/internal/node/test/chdir/cp.js b/internal/node/test/chdir/cp.js index 3e810e4c3a..13aedc45b9 100644 --- a/internal/node/test/chdir/cp.js +++ b/internal/node/test/chdir/cp.js @@ -12,3 +12,4 @@ function mkdirp(p) { mkdirp(dirname(dest)); fs.copyFileSync('_package.json', dest); +console.log('Copied _package.json ->', dest);