You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only output real errors, or required input, when a switch, such as -s, --silent, is provided.
A successful authentication would show:
$ gimme-aws-creds --silent
Unsuccessful would show any errors or required input:
$ gimme-aws-creds --silent -p badprofile
Configuration profile not found! Use the --action-configure flag to generate the profile.
Current Behavior
$ gimme-aws-creds
Using password from keyring for myuser
Saving arn:aws:iam::111111111111:role/MyRole as my_profile
Written profile my_profile to /home/myuser/.aws/credentials
$
The stdout can be ignored with:
$ gimme-aws-creds >/dev/null
Using password from keyring for myuser
$
But notice above that an informational line is printed to stderr.
A shell based workaround is to send stdout to null, and alter stderr. See examples below
## successful authentication prints nothing
$ gimme-aws-creds >/dev/null 2> >(grep -v "^Using password from" >&2)
$
## but error prints
$ gimme-aws-creds -p badprofile >/dev/null 2> >(grep -v "^Using password from" >&2)
Configuration profile not found! Use the --action-configure flag to generate the profile.
## and input is requested
$ gimme-aws-creds --roles badrole >/dev/null 2> >(grep -v "^Using password from" >&2)
ERROR: AWS roles [badrole] not found!
Pick a role:
[0] arn:aws:iam::111111111111:role/SomeRole
[1] arn:aws:iam::111111111111:role/AnotherROle
Possible Solution
Use a switch, such as -s, --silent.
Context
The noise of successful authentication is not always needed. Especially effects users who wrap gimme-aws-creds into their local scripts to ensure the session is fresh.
The text was updated successfully, but these errors were encountered:
Expected Behavior
Only output real errors, or required input, when a switch, such as
-s, --silent
, is provided.A successful authentication would show:
Unsuccessful would show any errors or required input:
Current Behavior
The stdout can be ignored with:
But notice above that an informational line is printed to stderr.
A shell based workaround is to send stdout to null, and alter stderr. See examples below
Possible Solution
Use a switch, such as
-s, --silent
.Context
The noise of successful authentication is not always needed. Especially effects users who wrap
gimme-aws-creds
into their local scripts to ensure the session is fresh.The text was updated successfully, but these errors were encountered: