summaryrefslogtreecommitdiff
path: root/cli/args
diff options
context:
space:
mode:
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);
}