From d9212636d6c60a3f4029347014b8da9b0f7361b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Andr=C3=A9?= Date: Thu, 26 Sep 2024 14:23:34 +0200 Subject: [PATCH] Use [[ .. ]] for test using globs Fixes the following shellcheck error: SC2081 (error): [ .. ] can't match globs. Use a case statement. https://www.shellcheck.net/wiki/SC2081 --- test/scripts/rpm-ostree_mock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/scripts/rpm-ostree_mock b/test/scripts/rpm-ostree_mock index 16e816cc97..bd99f2e25d 100755 --- a/test/scripts/rpm-ostree_mock +++ b/test/scripts/rpm-ostree_mock @@ -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