Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/node_task_runner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,12 @@ void ProcessRunner::Run() {
return;
}
}

// Adding node_modules/.bin under cwd to PATH environment variable
std::filesystem::path nmBin =
std::filesystem::path(cwd) / "node_modules" / ".bin";
if (std::filesystem::is_directory(nmBin)) {
path_env_var_ = nmBin.string() + env_var_separator + path_env_var_;
}
Comment on lines +224 to +229
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anonrig I tried to process the path given with --run-from and add the node_modules/.bin directory under the cwd to the PATH Without changing the cwd of the parent process, only the cwd of the spawned process will be set, is this a good solution ?

} else {
cwd = package_json_path_.parent_path().string();
}
Expand Down
Loading