The release workflow was passing `-ldflags '-X ...'` via `go_build_options`,
which gets set as the `GO_BUILD_OPTIONS` environment variable. In
`build_and_release.sh`, this variable is expanded unquoted (`${GO_BUILD_OPTIONS}`),
so bash word-splits it on spaces. Single quotes inside an unquoted variable
expansion are literal characters, not shell quotes - causing `'-X` (with the
literal quote character) to be passed as the value for `-ldflags`, which is
invalid.
Fix: use `-ldflags=-X=path.Var=value` (no spaces, single token) so bash word
splitting produces exactly one argument. The `=` syntax is supported by both
the Go build tool (for `-ldflags`) and the Go linker (for `-X`).
Co-authored-by: skarim <1701557+skarim@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-stack/sessions/7f8aece9-d05c-478e-8864-ff0b5e00b3a8
When a rebase conflict was detected during 'gh stack sync', the function
continued to push branches and reported 'Stack synced' with exit code 0.
Now it persists PR state and returns ErrConflict immediately, preventing
the confusing post-conflict push and success message.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When Ctrl+C is pressed during a prompter interaction, the CLI now prints
a friendly 'Received interrupt, aborting operation' message instead of
ugly wrapped errors like 'failed to read prefix: could not prompt:
interrupt'.
Changes:
- Add isInterruptError(), printInterrupt(), and errInterrupt sentinel
to cmd/utils.go for centralized interrupt detection
- Update all 8 prompt sites (init, push, checkout, utils) to detect
survey's terminal.InterruptErr and exit cleanly
- Update callers of resolveStack, pickRemote, and ensureRerere to
propagate interrupt without double-printing errors
- Change ensureRerere signature to return error so callers can abort
on interrupt
- Add tests for interrupt detection helpers
Closes td-746bdc
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>