Skip to content

Commit

Permalink
Use [[ .. ]] for test using globs
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 26, 2024
1 parent 3529811 commit d921263
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/scripts/rpm-ostree_mock
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/sh -x
#!/usr/bin/bash -x

# This script is meant to be a mock for `rpm-ostree`

# Write invocation with arguments to a file to allow making assertion.
echo "$*" >> /rpm-ostree_calls

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

0 comments on commit d921263

Please sign in to comment.