mirror of
https://github.com/anchore/grype
synced 2024-11-10 06:34:13 +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> |
||
---|---|---|
.. | ||
bus | ||
config | ||
file | ||
format | ||
log | ||
logger | ||
ui | ||
version | ||
constants.go | ||
input.go | ||
parse.go | ||
string_helpers.go | ||
string_helpers_test.go | ||
stringset.go |