diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-11-03 16:20:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-03 16:20:47 +0100 |
commit | a99539bd4d8466ef305e1cc7ce9a5b8f2c6b4881 (patch) | |
tree | 2d6d402cbf2d98ffa7a1f72f6a89dba7d5fa5f39 | |
parent | 77fb26e143d635f713a1ded93100210878c61f19 (diff) |
fix(lock): require --unstable flag to auto discover lockfile (#16524)
-rw-r--r-- | cli/lockfile.rs | 3 | ||||
-rw-r--r-- | cli/tests/integration/run_tests.rs | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/cli/lockfile.rs b/cli/lockfile.rs index b0cf68917..43c01b428 100644 --- a/cli/lockfile.rs +++ b/cli/lockfile.rs @@ -100,7 +100,7 @@ impl Lockfile { ) -> Result<Option<Lockfile>, AnyError> { let filename = match flags.lock { Some(ref lock) => PathBuf::from(lock), - None => match maybe_config_file { + None if flags.unstable => match maybe_config_file { Some(config_file) => { if config_file.specifier.scheme() == "file" { let mut path = config_file.specifier.to_file_path().unwrap(); @@ -112,6 +112,7 @@ impl Lockfile { } None => return Ok(None), }, + None => return Ok(None), }; let lockfile = Self::new(filename, flags.lock_write)?; diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 68d15bfd9..1f4f7d2ae 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -3630,7 +3630,7 @@ fn websocket_server_idletimeout() { } itest!(auto_discover_lockfile { - args: "run run/auto_discover_lockfile/main.ts", + args: "run --unstable run/auto_discover_lockfile/main.ts", output: "run/auto_discover_lockfile/main.out", http_server: true, exit_code: 10, |