Closed magenbluten closed 4 years ago
A simple fix for this is to quote the $@
inside the double quotes.
i.e.
grep -Fxf "$mak_dir/$pid-m" -- "'$@'" 2>/dev/null > "$mak_dir/$pid-c" ||:
At least, this worked for me when I tested it 😁
Hmm, scratch that it just breaks it but the error get's ignored thanks to 2>/dev/null
.
I guess a better solution might be to append a /dev/null
to the list of manifests to ensure the list is never empty:
set -- "$@" "/dev/null"
grep -Fxf "$mak_dir/$pid-m" -- "$@" 2>/dev/null > "$mak_dir/$pid-c" ||:
if no
manifest
file got found"$@"
might be empty and grep reads from stdin thus blocks forever.https://github.com/kisslinux/kiss/blob/0f054313e35d86cf0f7eca485cb9c2f4b1732422/kiss#L800