Commit 7d2993a
fix(local-stack): guard_port no longer kills make up on a fresh stack (#1076)
guard_port() assigns pid from `lsof ... | head -1` under set -euo
pipefail. lsof exits non-zero when nothing is listening on the port,
which is the normal case on the first `make up` of a fresh stack
(before the service has started). The non-zero status propagates out
of the command substitution and set -e kills the script before the
`[[ -z "$pid" ]] && return 0` emptiness guard runs, so the stack
never gets past the first guard_port call.
Append `|| true` so an empty result degrades to the guard instead of
aborting -- the same pattern the key/token lookups below already use.
The bug stays hidden once a service is already running, because
svc_running short-circuits before the lsof line.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent d155551 commit 7d2993a
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| |||
0 commit comments