1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-01 11:58:45 -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 committed by GitHub
parent 4365f8d999
commit 15f14630ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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()