Skip to content

Pedantic return codes when user is already logged in or logged out #85

@JonRoma

Description

@JonRoma

If I do an aws logout to ensure my session has been terminated, I get the following if I happen to have logged out already.

: aws logout
Already logged out!
: echo $?
3

I have no beef with the message, but I question whether the command should return non-zero. Since the logout is in this case a no-op, I don't think it should be an error to have the command's outcome be the state that one wants in the first place. :-)

Likewise, similar behavior takes place when I try to log in and have already done so, and I suggest reviewing this as well. I don't think we need the exclamation point in either case, because there is nothing demanding a user's urgent attention. :-)

: aws login
Already logged in!
: echo $?
2

If it is feasible and practical, it would be nice if the Already logged in! message listed the account name, number or role.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requeststaleClosed as stale

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions