0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-07 23:06:50 -05:00

fix(install/global): warn about not including auto-discovered config file (#27745)

Closes #17855
This commit is contained in:
David Sherret 2025-01-27 14:18:27 -05:00 committed by GitHub
parent 88490d0927
commit 92dce12af7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 17 additions and 0 deletions

View file

@ -409,6 +409,12 @@ async fn install_global(
.load_and_type_check_files(&[install_flags_global.module_url.clone()])
.await?;
if matches!(flags.config_flag, ConfigFlag::Discover)
&& cli_options.workspace().deno_jsons().next().is_some()
{
log::warn!("{} discovered config file will be ignored in the installed command. Use the --config flag if you wish to include it.", crate::colors::yellow("Warning"));
}
// create the install shim
create_install_shim(http_client, &flags, install_flags_global).await
}

View file

@ -0,0 +1,5 @@
{
"tempDir": true,
"args": "install --root ./bins -g --name my-cli main.js",
"output": "install.out"
}

View file

@ -0,0 +1,2 @@
{
}

View file

@ -0,0 +1,3 @@
Warning discovered config file will be ignored in the installed command. Use the --config flag if you wish to include it.
✅ Successfully installed my-cli
[WILDCARD]

View file

@ -0,0 +1 @@
console.log(1);