Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
fix: remove flock if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
xtuc committed Jun 1, 2019
1 parent c5468b1 commit de67816
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/wranglerjs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,12 @@ pub fn run_npm_install(dir: PathBuf) -> Result<(), failure::Error> {
info!("skipping npm install because node_modules exists");
}

// TODO(sven): figure out why the file doesn't exits in some cases? Even if
// the thread should have locked it.
if flock_path.exists() {
fs::remove_file(&flock_path)?;
}
flock.unlock()?;
fs::remove_file(&flock_path)?;

Ok(())
}
Expand Down

0 comments on commit de67816

Please sign in to comment.