Skip to content

Commit efa1b8e

Browse files
Fix check_update_lock() to provide user guidance for potentially stale lock files (#133)
* Initial plan * Add manual fix instructions for stale lock files in check_update_lock() Co-authored-by: paolomainardi <8747+paolomainardi@users.noreply.github.com> * Update lock file message to be less definitive about staleness per review feedback Co-authored-by: paolomainardi <8747+paolomainardi@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: paolomainardi <8747+paolomainardi@users.noreply.github.com>
1 parent 6c6d40d commit efa1b8e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

bin/sparkdock.macos

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ check_for_updates() {
6464
elif ps -p "$pid" > /dev/null; then
6565
print "Another update is in progress (PID: $pid)"
6666
exit 1
67+
else
68+
print_warning "Lock file exists but the process (PID: $pid) is no longer running."
69+
print_warning "If you believe this is a stale lock file, you can remove it manually by running:"
70+
print_warning " rm -f $LOCK_FILE"
71+
exit 1
6772
fi
6873
fi
6974
echo $$ > "$LOCK_FILE"

0 commit comments

Comments
 (0)