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

Entry scripts return 0 status code on KeyboardInterrupt #244

Closed
kirilyuro opened this issue Sep 6, 2020 · 0 comments
Closed

Entry scripts return 0 status code on KeyboardInterrupt #244

kirilyuro opened this issue Sep 6, 2020 · 0 comments

Comments

@kirilyuro
Copy link

kirilyuro commented Sep 6, 2020

Expected Behavior

The scripts should return a non-0 status code when interrupted.

According to the Advanced Bash-Scripting Guide, bin/gimme-aws-creds should return status code 130.
The Windows script bin/gimme-aws-creds.cmd can do the same for consistency, as there doesn't seem to be a convention.

Current Behavior

Currently, the entry script suppresses the KeyboardInterrupt and completes successfully:

    try:
        GimmeAWSCreds().run()
    except KeyboardInterrupt:
        pass

Steps to Reproduce

  1. Run gimme-aws-prod.
  2. Wait a second or two for script to start doing its thing.
  3. Send SIGINT (Ctrl+C).
  4. Output exit code (echo $? or whatever your shell is using).
  5. => Observe status code 0.

Context

Trying to invoke gimme-aws-creds from another script, and need to make sure that it completes successfully, i.e. that valid aws credentials are present, otherwise my script should fail.

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