Skip to content

Commit

Permalink
Merge pull request #368 from streamdal/blinktag/367_disable_stdin_on_…
Browse files Browse the repository at this point in the history
…read

Stdin should only be read on write commands
  • Loading branch information
blinktag authored Feb 21, 2024
2 parents 32673c7 + 90d2017 commit 9f0239e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ func readFromStdin(opts *opts.CLIOptions) {
logrus.Fatal(err)
}

if opts.Global.XAction != "write" {
return
}

if info.Mode()&os.ModeCharDevice != 0 {
return
}
Expand Down

0 comments on commit 9f0239e

Please sign in to comment.