Skip to content

Commit cf8e07d

Browse files
committed
fix(dev): auto-remove stale overmind socket on start
A crashed overmind run leaves .overmind.sock behind, so the next bin/dev aborts with "overmind is already running". Remove the socket before starting, guarded by a pgrep check so a live session is never clobbered. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 12ccfe8 commit cf8e07d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

bin/dev

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ export PORT="${PORT:-3000}"
44

55
if command -v overmind 1> /dev/null 2>&1
66
then
7+
# Remove a stale socket left behind by a crashed run (no live overmind).
8+
if [ -S ./.overmind.sock ] && ! pgrep -f "overmind start" > /dev/null 2>&1
9+
then
10+
rm -f ./.overmind.sock
11+
fi
712
overmind start -f Procfile.dev "$@"
813
exit $?
914
fi

0 commit comments

Comments
 (0)