From 8165cded14abd82d5f5995c0660a8a046c91630e Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 20 Dec 2022 12:00:57 -0500 Subject: fix: ignore local lockfile for deno install and uninstall (#17145) Closes #17116 --- cli/args/lockfile.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cli/args') diff --git a/cli/args/lockfile.rs b/cli/args/lockfile.rs index 012d9782e..1b5eddf3a 100644 --- a/cli/args/lockfile.rs +++ b/cli/args/lockfile.rs @@ -19,6 +19,8 @@ use crate::tools::fmt::format_json; use crate::util; use crate::Flags; +use super::DenoSubcommand; + #[derive(Debug)] pub struct LockfileError(String); @@ -96,7 +98,12 @@ impl Lockfile { flags: &Flags, maybe_config_file: Option<&ConfigFile>, ) -> Result, AnyError> { - if flags.no_lock { + if flags.no_lock + || matches!( + flags.subcommand, + DenoSubcommand::Install(_) | DenoSubcommand::Uninstall(_) + ) + { return Ok(None); } -- cgit v1.2.3