feat(install): warn repeatedly about not-run lifecycle scripts on explicit installs (#25878)

Currently we only warn once. With this PR, we continue to warn about
not-run scripts on explicit `deno install` (or cache). For `run` (or
other subcommands) we only warn the once, as we do currently.
This commit is contained in:
Nathan Whitaker 2024-09-26 10:13:33 -07:00 committed by GitHub
parent 13c53d9727
commit 543c687c34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 37 additions and 3 deletions

View file

@ -1686,6 +1686,12 @@ impl CliOptions {
allowed: self.flags.allow_scripts.clone(),
initial_cwd: self.initial_cwd.clone(),
root_dir: self.workspace().root_dir_path(),
explicit_install: matches!(
self.sub_command(),
DenoSubcommand::Install(_)
| DenoSubcommand::Cache(_)
| DenoSubcommand::Add(_)
),
}
}
}