diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-07-02 17:54:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-02 17:54:51 +0200 |
commit | cc12e86fe36a77ecb0bb836ba82e823ca26abdc2 (patch) | |
tree | f7d7b63ca25400d41755da5d7e73adc4565e7ce9 /cli/main.rs | |
parent | 74c260517a40d9644960b01415824e1c6c646fde (diff) |
refactor: lock file (#6569)
- refactor lock file creation
- provide deterministic output in lock file (alphabetically sorted)
- dynamic imports are checked against lock file
Diffstat (limited to 'cli/main.rs')
-rw-r--r-- | cli/main.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/cli/main.rs b/cli/main.rs index 7dcc7326a..3f5b9f734 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -140,19 +140,6 @@ fn write_to_stdout_ignore_sigpipe(bytes: &[u8]) -> Result<(), std::io::Error> { } } -fn write_lockfile(global_state: GlobalState) -> Result<(), std::io::Error> { - if global_state.flags.lock_write { - if let Some(ref lockfile) = global_state.lockfile { - let g = lockfile.lock().unwrap(); - g.write()?; - } else { - eprintln!("--lock flag must be specified when using --lock-write"); - std::process::exit(11); - } - } - Ok(()) -} - fn print_cache_info(state: &GlobalState) { println!( "{} {:?}", @@ -356,8 +343,6 @@ async fn cache_command(flags: Flags, files: Vec<String>) -> Result<(), ErrBox> { worker.preload_module(&specifier).await.map(|_| ())?; } - write_lockfile(global_state)?; - Ok(()) } @@ -606,7 +591,6 @@ async fn run_command(flags: Flags, script: String) -> Result<(), ErrBox> { debug!("main_module {}", main_module); worker.execute_module(&main_module).await?; - write_lockfile(global_state)?; worker.execute("window.dispatchEvent(new Event('load'))")?; (&mut *worker).await?; worker.execute("window.dispatchEvent(new Event('unload'))")?; |