Skip to content

fix: fall back to ~/.config/nais for credentials on macOS#646

Closed
jhrv wants to merge 1 commit intomainfrom
fix/macos-credentials-fallback
Closed

fix: fall back to ~/.config/nais for credentials on macOS#646
jhrv wants to merge 1 commit intomainfrom
fix/macos-credentials-fallback

Conversation

@jhrv
Copy link
Contributor

@jhrv jhrv commented Feb 17, 2026

On macOS, getCredentialsFilePath respects XDG_CONFIG_HOME, but processes without this env var (e.g. MCP servers started by editors) fail to find credentials written to ~/.config/nais/.

This adds a fallback in readCredentialsFile to check ~/.config/nais/ when the primary path does not exist.

On macOS, getCredentialsFilePath respects XDG_CONFIG_HOME, but processes
without this env var (e.g. MCP servers) fail to find credentials written
to ~/.config/nais/. Add a fallback in readCredentialsFile to check
~/.config/nais/ when the primary path does not exist.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor

📝 Changelog preview

Below is a preview of the Changelog that will be added to the next release. Only commit messages that follow the Conventional Commits specification will be included in the Changelog.

v4.0.1 - 2026-02-17

Full Changelog: v4.0.0...v4.0.1

🐛 Bug Fixes

  • Fall back to ~/.config/nais for credentials on macOS (7eed5ac)

@jhrv jhrv requested a review from sechmann February 17, 2026 09:29
@Kyrremann
Copy link
Contributor

Glemte å fikse dette forrige uke, jeg anbefaler at vi gjenbruker configen som er satt i App-instansen/Viper. Så vi fortsetter å bruke --config flagget, og er sikker på at vår config havner i samme katalog.

@jhrv
Copy link
Contributor Author

jhrv commented Feb 17, 2026

fjerner denne PRen. @sechmann ordner noe greier

@jhrv jhrv closed this Feb 17, 2026
@Kyrremann Kyrremann deleted the fix/macos-credentials-fallback branch February 17, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments