mirror of
https://github.com/anchore/syft
synced 2024-11-10 06:14:16 +00:00
Signed-off-by: Gorny Krystian <krystian.gorny@wipotec.com> Co-authored-by: Gorny Krystian <krystian.gorny@wipotec.com>
This commit is contained in:
parent
50016c3172
commit
cb0de97bc3
1 changed files with 6 additions and 1 deletions
|
@ -69,6 +69,11 @@ if ! command -v xxd &> /dev/null; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# check if xargs is even installed
|
||||||
|
if ! command -v xargs &> /dev/null; then
|
||||||
|
echo "xargs not found. Please install xargs."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
PATTERN=${SEARCH_FOR:-$VERSION}
|
PATTERN=${SEARCH_FOR:-$VERSION}
|
||||||
|
|
||||||
|
@ -116,7 +121,7 @@ while $CONTINUE_LOOP; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# search for the pattern in the binary file and capture the offset
|
# search for the pattern in the binary file and capture the offset
|
||||||
OFFSET=$(echo "${SELECTED_RESULT}" | cut -d ' ' -f 1)
|
OFFSET=$(echo "${SELECTED_RESULT}" | xargs | cut -d ' ' -f 1)
|
||||||
|
|
||||||
if [ -z "$OFFSET" ]; then
|
if [ -z "$OFFSET" ]; then
|
||||||
echo "Pattern not found."
|
echo "Pattern not found."
|
||||||
|
|
Loading…
Reference in a new issue