mirror of
https://github.com/anchore/grype
synced 2024-11-12 23:37:06 +00:00
e1bdbc7d27
I figured out that running `cat syft.json | grype` works but `grype < syft.json` does not work. This happens, because the IsPipedInput method only checks if stdin is a pipe which will be false if stdin is fed by a redirect. The go idiomatic way to fix this is by just checking if the file produced by stat has a size > 0. Implemented this check, that will recognize stdin by redirect, in the IsPipedInput() method. Renamed the method to IsStdinPipeOrRedirect(). Signed-off-by: Felix Becker <git@felixbecker.name> Co-authored-by: Benjamin Neff <benjamin@coding4coffee.ch> |
||
---|---|---|
.. | ||
cmd.go | ||
completion.go | ||
db.go | ||
db_check.go | ||
db_delete.go | ||
db_diff.go | ||
db_import.go | ||
db_list.go | ||
db_status.go | ||
db_update.go | ||
event_loop.go | ||
event_loop_test.go | ||
report_writer.go | ||
root.go | ||
root_test.go | ||
signals.go | ||
util.go | ||
version.go |