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

Make the cli suitable for scripting use. #134

Merged
merged 2 commits into from
Jun 21, 2023

Conversation

brotskydotcom
Copy link
Collaborator

The CLI was very chatty about its operations, which made it unsuitable for use in scripts. In addition, it always exited with a success (0) status, even when operations failed.

This change fixes both of those issues:

  1. The cli doesn't output anything to stdout except when it retrieves a password successfully, in which case the password (alone) is output followed by a newline.
  2. The cli doesn't output anything to stderr unless the -v (verbose) flag is specified, in which case it prints debugging info to stderr on all operations.
  3. The cli exits with status 0 only for success; if an error is encountered it returns status 1.

Fixes #130.

The CLI was very chatty about its operations, which made it
unsuitable for use in scripts.  In addition, it always exited
with a success (0) status, even when operations failed.

This change fixes both of those issues:

1. The cli doesn't output anything to stdout except
when it retrieves a password successfully, in which case
the password (alone) is output followed by a newline.
2. The cli doesn't output anything to stderr unless
the -v (verbose) flag is specified, in which case it
prints debugging info to stderr on all operations.
3. The cli exits with status 0 only for success; if
an error is encountered it returns status 1.

Fixes hwchen#130.
@brotskydotcom brotskydotcom merged commit 1df5abe into hwchen:master Jun 21, 2023
@brotskydotcom brotskydotcom deleted the issue-130 branch June 21, 2023 05:48
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

Successfully merging this pull request may close these issues.

Add a way to only get the secret
1 participant