Skip to content

refactor!: derive credentials path from config#647

Merged
sechmann merged 1 commit intomainfrom
config_handling
Feb 18, 2026
Merged

refactor!: derive credentials path from config#647
sechmann merged 1 commit intomainfrom
config_handling

Conversation

@sechmann
Copy link
Contributor

@sechmann sechmann commented Feb 18, 2026

The credentials file path was independently computing the config directory
using os.UserConfigDir() with a Darwin/XDG override, duplicating logic
already handled by naistrix. Now derives the path from the global --config
flag, ensuring credentials are always stored alongside the config file.

This XDG_CONFIG_DIR overriding for macos created edge cases where IDE's
launched nais cli without the same env vars as the users shell.

If you have use-cases where you need nais cli to store it's config in a
specific location and you used XDG_CONFIG_DIR before, you now have to
use the --config flag instead.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 18, 2026

📝 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.

v5.0.0 - 2026-02-18

Full Changelog: v4.0.0...v5.0.0

⚙️ Miscellaneous Changes

  • 💥 Breaking change: Derive credentials path from config (28d83cb)

The credentials file path was independently computing the config directory
using os.UserConfigDir() with a Darwin/XDG override, duplicating logic
already handled by naistrix. Now derives the path from the global --config
flag, ensuring credentials are always stored alongside the config file.

This XDG_CONFIG_DIR overriding for macos created edge cases where IDE's
launched nais cli without the same env vars as the users shell.

If you have use-cases where you need nais cli to store it's config in a
specific location and you used XDG_CONFIG_DIR before, you now have to
use the --config flag instead.
@sechmann sechmann changed the title config handling refactor!: derive credentials path from config Feb 18, 2026
@sechmann sechmann merged commit 1d420dd into main Feb 18, 2026
19 checks passed
@sechmann sechmann deleted the config_handling branch February 18, 2026 12:15
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.

1 participant