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

cmd/setec: do not prompt for secret values when stdin is a pipe #81

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

creachadair
Copy link
Member

I debated whether to make an additional flag to specifically request this
behaviour, but since we already sniff the terminal for output I thought I'd
start with this.

Curiously, I noticed we also trim space off a file input, which is kinda OK if
we know the file is text, but could break binary input. We might want a flag to
override that in one direction or other too.

@creachadair
Copy link
Member Author

Another option, though perhaps too subtle: if utf8.Valid(value) { value = bytes.TrimSpace(value) }

@creachadair
Copy link
Member Author

Oh I need to update the help text too.

@creachadair creachadair merged commit 91bc583 into main Oct 6, 2023
@creachadair creachadair deleted the mjf/stdin branch October 6, 2023 16:37
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.

2 participants