Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/bootstrap/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn main() {
// Display PID of process holding the lock
// PID will be stored in a lock file
let lock_path = config.out.join("lock");
let pid = fs::read_to_string(&lock_path).unwrap_or_default();
let pid = fs::read_to_string(&lock_path);

build_lock = fd_lock::RwLock::new(t!(fs::OpenOptions::new()
.write(true)
Expand All @@ -47,7 +47,11 @@ fn main() {
}
err => {
drop(err);
println!("WARNING: build directory locked by process {pid}, waiting for lock");
if let Ok(pid) = pid {
println!("WARNING: build directory locked by process {pid}, waiting for lock");
} else {
println!("WARNING: build directory locked, waiting for lock");
}
let mut lock = t!(build_lock.write());
t!(lock.write(process::id().to_string().as_ref()));
lock
Expand Down
Loading