-
Notifications
You must be signed in to change notification settings - Fork 14
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
Read shell scripts from STDIN #8
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If the script is coming from STDIN, ignore the --target executable and finish by echoing the contents instead. Also disable --inspect to avoid tangling the pipes.
If there's more than one match (or no matches), bail with an error. Piped input means we don't get to be interactive.
Run only gets called when the script is specified on the command line (not piped in).
ellotheth
force-pushed
the
issue-1/read-from-stdin
branch
from
March 4, 2016 04:35
b0432a7
to
2e7792d
Compare
Matches from the local keyring won't have usernames, and attached signatures won't have a Source().
ellotheth
force-pushed
the
issue-1/read-from-stdin
branch
from
March 19, 2016 17:46
57a1eff
to
539631d
Compare
Instead of showing a zero-length list and offering nonsensical options!
ellotheth
force-pushed
the
issue-1/read-from-stdin
branch
3 times, most recently
from
March 19, 2016 18:29
111dde3
to
345ce4c
Compare
ellotheth
force-pushed
the
issue-1/read-from-stdin
branch
from
March 19, 2016 18:29
345ce4c
to
ee3541a
Compare
ellotheth
added a commit
that referenced
this pull request
Mar 19, 2016
Fixes #1: Read shell scripts from STDIN
Awesome, thanks for implementing this. |
@odeke-em Most welcome. Thanks for your work on it too, it was helpful! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Accept a script from
STDIN
. Reading from a pipe kills the interactive options (because it eatsSTDIN
), so the behavior is different:--inspect
is ignored.--target
is ignored. Instead of running the script,pipethis
will echo the contents toSTDOUT
(so it can be piped to the target executable, e.g.curl | pipethis | sh
).Fixes #1. See also #6.