diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-11-03 16:42:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-03 16:42:56 +0100 |
commit | dae3940519d626ddfeb954e3f3d7ebe8b83067bf (patch) | |
tree | 31877f91b39c623e208a81c029b26b119c878205 /cli/lockfile.rs | |
parent | a99539bd4d8466ef305e1cc7ce9a5b8f2c6b4881 (diff) |
fix(lock): add --no-lock flag to disable auto discovery of lock file (#16526)
Diffstat (limited to 'cli/lockfile.rs')
-rw-r--r-- | cli/lockfile.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/lockfile.rs b/cli/lockfile.rs index 43c01b428..cdb40c530 100644 --- a/cli/lockfile.rs +++ b/cli/lockfile.rs @@ -98,6 +98,10 @@ impl Lockfile { flags: &Flags, maybe_config_file: Option<&ConfigFile>, ) -> Result<Option<Lockfile>, AnyError> { + if flags.no_lock { + return Ok(None); + } + let filename = match flags.lock { Some(ref lock) => PathBuf::from(lock), None if flags.unstable => match maybe_config_file { |