Skip to content

Windows: credential command execution via sh -c may fail #77

@cboone

Description

@cboone

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions