Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output logging messages to stderr so --dry-run output can be piped #69

Open
briceburg opened this issue Aug 4, 2022 · 1 comment
Open

Comments

@briceburg
Copy link

briceburg commented Aug 4, 2022

to "behave" as expected IMO we should print login messages and other logging type information to stderr so that output can be redirected to configuration files;

e.g. running

aws-sso-util configure populate  --dry-run > foo.config

should a produce a file that starts with [profile ...] instead of

Logging in to https://ACME.awsapps.com/start/
Gathering accounts and roles
Dry run for 146 profiles
[profile ACME-...]
...
@benkehoe
Copy link
Owner

benkehoe commented Aug 15, 2022

I changed the logging specifically to use stderr only for errors with #54. I don't think --dry-run with piped stdout is the right way to do this. You can currently accomplish this with:

AWS_CONFIG_FILE=foo.config aws-sso-util configure populate

but I could add an explicit option for --config-file to make it less obscure.

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

No branches or pull requests

2 participants