summaryrefslogtreecommitdiff
path: root/cli/args
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-12-20 12:00:57 -0500
committerGitHub <noreply@github.com>2022-12-20 12:00:57 -0500
commit8165cded14abd82d5f5995c0660a8a046c91630e (patch)
treeb71ce2b9bfd3d826ff19de94f1c4becab9d0c1a2 /cli/args
parenta06f59981b95d011f162e595031574c83586c84a (diff)
fix: ignore local lockfile for deno install and uninstall (#17145)
Closes #17116
Diffstat (limited to 'cli/args')
-rw-r--r--cli/args/lockfile.rs9
1 files changed, 8 insertions, 1 deletions
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<Option<Lockfile>, AnyError> {
- if flags.no_lock {
+ if flags.no_lock
+ || matches!(
+ flags.subcommand,
+ DenoSubcommand::Install(_) | DenoSubcommand::Uninstall(_)
+ )
+ {
return Ok(None);
}