Skip to content

fix: registry commands respect AWS_CONFIG_FILE#927

Open
yuriipolishchuk wants to merge 1 commit intofwdcloudsec:mainfrom
yuriipolishchuk:fix/registry-respect-aws-config-file
Open

fix: registry commands respect AWS_CONFIG_FILE#927
yuriipolishchuk wants to merge 1 commit intofwdcloudsec:mainfrom
yuriipolishchuk:fix/registry-respect-aws-config-file

Conversation

@yuriipolishchuk
Copy link

@yuriipolishchuk yuriipolishchuk commented Mar 9, 2026

Fixes #926

Registry commands (add, sync, remove, setup) ignored AWS_CONFIG_FILE and always used ~/.aws/config. This was fixed for assume in #229 but missed for registry.

The fix reuses cfaws.GetAWSConfigPath() — the same function already used by assume, granted sso, and granted credentials to resolve the config path.

Added tests for both custom and default paths.

granted registry add/sync/remove/setup ignored the AWS_CONFIG_FILE
environment variable and always wrote to ~/.aws/config. The assume
command was fixed for this in fwdcloudsec#229, but registry commands were missed.

This change reuses cfaws.GetAWSConfigPath() which already handles
AWS_CONFIG_FILE correctly, consistent with AWS CLI behavior:
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
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.

Registry commands ignore AWS_CONFIG_FILE environment variable

1 participant