summaryrefslogtreecommitdiff
path: root/cli/task_runner.rs
diff options
context:
space:
mode:
authorNathan Whitaker <17734409+nathanwhit@users.noreply.github.com>2024-07-19 11:59:04 -0700
committerGitHub <noreply@github.com>2024-07-19 18:59:04 +0000
commita4c76add565b9674ef6880de88013948c61a1ce5 (patch)
tree6dc75f90b2788b1028453308f3b46708d460936f /cli/task_runner.rs
parentf6c7c13764a7952b878a2141fdf01ed68d169ea2 (diff)
fix(cli): Respect implied BYONM from DENO_FUTURE in `deno task` (#24652)
Regression from https://github.com/denoland/deno/commit/04f9db5b2217fe06f88e76146aac6362ff0b0b86 Originally I thought to fix the issue in the PR we needed to explicitly pass through the `node-modules-dir` flag, but after applying the correct fix that david pointed out (setting `NPM_PROCESS_STATE`) that wasn't necessary (or correct). We had a test for deno task with BYONM, but it only tested with `"unstable": ["byonm"]` in deno.json, so it didn't catch this.
Diffstat (limited to 'cli/task_runner.rs')
-rw-r--r--cli/task_runner.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/cli/task_runner.rs b/cli/task_runner.rs
index 7653594e5..e8937590d 100644
--- a/cli/task_runner.rs
+++ b/cli/task_runner.rs
@@ -164,9 +164,7 @@ impl ShellCommand for NpmCommand {
}
}
-pub struct NodeCommand {
- pub force_node_modules_dir: bool,
-}
+pub struct NodeCommand;
impl ShellCommand for NodeCommand {
fn execute(
@@ -193,9 +191,6 @@ impl ShellCommand for NodeCommand {
.execute(context);
}
args.extend(["run", "-A"].into_iter().map(|s| s.to_string()));
- if self.force_node_modules_dir {
- args.push("--node-modules-dir=true".to_string());
- }
args.extend(context.args.iter().cloned());
let mut state = context.state;
@@ -308,7 +303,6 @@ impl ShellCommand for NodeModulesFileRunCommand {
let mut args = vec![
"run".to_string(),
"--ext=js".to_string(),
- "--node-modules-dir=true".to_string(),
"-A".to_string(),
self.path.to_string_lossy().to_string(),
];