Summary
The credential command is executed via sh -c, which works on macOS and Linux but may fail on Windows where sh is not guaranteed to be available. Since the project builds Windows binaries (via .goreleaser.yml), authentication will fail at runtime on Windows unless sh is present (e.g., via Git Bash or WSL).
Suggested approach
Select the shell per-OS at runtime:
sh -c on macOS/Linux (current behavior)
cmd.exe /C on Windows
Alternatively, execute the command directly without an intermediate shell when possible.
Context
Flagged during PR #76 code review. The credential command mechanism was introduced in feature/allow-configuring-credential-store.
Relevant code
cmd/root.go: resolveToken() function, line ~149
.goreleaser.yml: Windows is a build target (goos includes windows)
Summary
The credential command is executed via
sh -c, which works on macOS and Linux but may fail on Windows whereshis not guaranteed to be available. Since the project builds Windows binaries (via.goreleaser.yml), authentication will fail at runtime on Windows unlessshis present (e.g., via Git Bash or WSL).Suggested approach
Select the shell per-OS at runtime:
sh -con macOS/Linux (current behavior)cmd.exe /Con WindowsAlternatively, execute the command directly without an intermediate shell when possible.
Context
Flagged during PR #76 code review. The credential command mechanism was introduced in
feature/allow-configuring-credential-store.Relevant code
cmd/root.go:resolveToken()function, line ~149.goreleaser.yml: Windows is a build target (goos includeswindows)