1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-11 10:07:54 -05:00

fix(init): always force managed node modules (#27047)

Closes https://github.com/denoland/deno/issues/27045
This commit is contained in:
Bartek Iwańczuk 2024-11-25 14:42:34 +00:00
parent 1f1b16d548
commit 5d7ad60e53
No known key found for this signature in database
GPG key ID: 0C6BCDDC3B3AD750

View file

@ -9,6 +9,7 @@ use crate::args::RunFlags;
use crate::colors;
use color_print::cformat;
use color_print::cstr;
use deno_config::deno_json::NodeModulesDirMode;
use deno_core::anyhow::Context;
use deno_core::error::AnyError;
use deno_core::serde_json::json;
@ -288,6 +289,7 @@ async fn init_npm(name: &str, args: Vec<String>) -> Result<i32, AnyError> {
},
allow_scripts: PackagesAllowedScripts::All,
argv: args,
node_modules_dir: Some(NodeModulesDirMode::Auto),
subcommand: DenoSubcommand::Run(RunFlags {
script: script_name,
..Default::default()