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

Don't attempt to read password on stdin if stdin isn't a tty #6689

Merged
merged 3 commits into from
Nov 13, 2020

Conversation

mrmr1993
Copy link
Member

Checklist:

  • Document code purpose, how to use it
    • Mention expected invariants, implicit constraints
  • Tests were added for the new behavior
    • Document test purpose, significance of failures
    • Test names should reflect their purpose
  • All tests pass (CI will check this if you didn't)
  • Serialized types are in stable-versioned modules
  • Does this close issues? List them:

Closes #6681

@mrmr1993 mrmr1993 added the ci-build-me Add this label to trigger a circle+buildkite build for this branch label Nov 12, 2020
@mrmr1993 mrmr1993 requested a review from a team as a code owner November 12, 2020 23:50
@nholland94
Copy link
Member

Even if stdin is a tty, I think we still might want to just skip this prompt. I believe @lk86 was saying that this prompt gets hidden from users by other logs and that users end up not seeing the prompt. I'll defer to @lk86 to confirm what we should/shouldn't do.

@lk86
Copy link
Contributor

lk86 commented Nov 12, 2020

We're always instructing people to either use an environment variable or -block-producer-password, so if we don't have a password it should always fail and point people to CODA_PRIVKEY_PASS + -block-producer-password.

@mrmr1993
Copy link
Member Author

mrmr1993 commented Nov 13, 2020

Updated. I've added a new function that only checks the environment variable, and changed the calls from the daemon command's startup to go through that.

The client/accounts/etc. commands that require a password will still prompt if needed, and I don't this this causes us the same issues, so leaving the old functionality available to be used there.

@mergify mergify bot merged commit 4924039 into develop Nov 13, 2020
@mergify mergify bot deleted the feature/dont-hang-password-prompt branch November 13, 2020 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch ready-to-merge-into-develop
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not block on keyfile password input
3 participants