summaryrefslogtreecommitdiff
path: root/cli/tools/installer.rs
diff options
context:
space:
mode:
authorNathan Whitaker <17734409+nathanwhit@users.noreply.github.com>2024-07-02 15:00:16 -0700
committerGitHub <noreply@github.com>2024-07-02 15:00:16 -0700
commitc13b6d1413859d03b41b97d4c671fccfd388b2cc (patch)
tree503c5d2c51c71f3daa79950b6862b725e9211822 /cli/tools/installer.rs
parentd379c0b299411a847765e2879f8ed14bdb2d0298 (diff)
feat(cli): Add `--frozen` flag to error out if lockfile is out of date (#24355)
Closes #18296. Adds a `--frozen` (alias `--frozen-lockfile`) flag that errors out if the lockfile is out of date. This is useful for running in CI (where an out of date lockfile is usually a mistake) or to prevent accidental changes in dependencies. ![Screenshot 2024-06-26 at 7 11 13 PM](https://github.com/denoland/deno/assets/17734409/538404b8-b422-4f05-89e8-4c9b1c248576)
Diffstat (limited to 'cli/tools/installer.rs')
-rw-r--r--cli/tools/installer.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/tools/installer.rs b/cli/tools/installer.rs
index 9704e5966..9d5b6baf3 100644
--- a/cli/tools/installer.rs
+++ b/cli/tools/installer.rs
@@ -466,6 +466,10 @@ async fn resolve_shim_data(
executable_args.push("--cached-only".to_string());
}
+ if flags.frozen_lockfile {
+ executable_args.push("--frozen".to_string());
+ }
+
if resolve_no_prompt(&flags.permissions) {
executable_args.push("--no-prompt".to_string());
}