Skip to content

Commit

Permalink
Use grep for matching args with sh
Browse files Browse the repository at this point in the history
Fixes the following shellcheck error:

    SC2081 (error): [ .. ] can't match globs. Use a case statement.

https://www.shellcheck.net/wiki/SC2081
  • Loading branch information
mandre committed Sep 27, 2024
1 parent 3529811 commit a5c53b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/scripts/rpm-ostree_mock
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Write invocation with arguments to a file to allow making assertion.
echo "$*" >> /rpm-ostree_calls

if [ "$*" != *"--append"* ]
if ! echo "$*" | grep -q "\--append"
then
# Caller is trying to read kernel arguments.
cat /proc/cmdline
Expand Down

0 comments on commit a5c53b5

Please sign in to comment.