Skip to content
New issue

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

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

Already on GitHub? # to your account

Check for tty and allow force. #89

Merged
merged 1 commit into from
Nov 7, 2022
Merged

Check for tty and allow force. #89

merged 1 commit into from
Nov 7, 2022

Conversation

tristanmorgan
Copy link
Owner

Description

Adds a feature to suppress outputting credentials to the terminal output and show a warning. Can override with a new --force flag on JSON and ENV subcommands. Specifically intended to not break scripts and just warn users.

Did you run the Tests?

  • Rubocop
  • Rspec
  • Filemode
  • Yard

# Print Env vars
def env(account = nil)
if options[:unset]
put_env_string(account: nil, key: nil, secret: nil, token: nil)
else
if $stdout.isatty && !options[:force]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be false if:
awskeyring | cat

Is that acceptable behaviour?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@tristanmorgan tristanmorgan merged commit cfb18ad into main Nov 7, 2022
@tristanmorgan tristanmorgan deleted the tty_check branch November 7, 2022 03:10
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants