[zstdgrep] Log zstd decompression errors to stderr
This commit is contained in:
parent
8974906129
commit
2c10bbd866
@ -109,7 +109,7 @@ if [ "$#" -lt 1 ]; then
|
|||||||
# ... on stdin
|
# ... on stdin
|
||||||
set -f # Disable file name generation (globbing).
|
set -f # Disable file name generation (globbing).
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
"${zcat}" -fq - | "${grep}" ${grep_args} -- "${pattern}" -
|
"${zcat}" -f - | "${grep}" ${grep_args} -- "${pattern}" -
|
||||||
EXIT_CODE=$?
|
EXIT_CODE=$?
|
||||||
set +f
|
set +f
|
||||||
else
|
else
|
||||||
@ -121,9 +121,9 @@ else
|
|||||||
while [ "$#" -gt 0 ]; do
|
while [ "$#" -gt 0 ]; do
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
if [ $pattern_found -eq 2 ]; then
|
if [ $pattern_found -eq 2 ]; then
|
||||||
"${zcat}" -fq -- "$1" | "${grep}" --label="${1}" ${grep_args} -- -
|
"${zcat}" -f -- "$1" | "${grep}" --label="${1}" ${grep_args} -- -
|
||||||
else
|
else
|
||||||
"${zcat}" -fq -- "$1" | "${grep}" --label="${1}" ${grep_args} -- "${pattern}" -
|
"${zcat}" -f -- "$1" | "${grep}" --label="${1}" ${grep_args} -- "${pattern}" -
|
||||||
fi
|
fi
|
||||||
[ "$?" -ne 0 ] && EXIT_CODE=1
|
[ "$?" -ne 0 ] && EXIT_CODE=1
|
||||||
shift
|
shift
|
||||||
|
Loading…
x
Reference in New Issue
Block a user