From 59ac33cebefd1721eb10d6b97692ec43c3746b57 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Sun, 25 Dec 2022 08:00:15 +0100 Subject: [PATCH] make shellcheck 0.9.0-1 more happy --- tests/cwd-directory-not-accessible-by-unshared-user | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/cwd-directory-not-accessible-by-unshared-user b/tests/cwd-directory-not-accessible-by-unshared-user index ed0834d..2716ccb 100644 --- a/tests/cwd-directory-not-accessible-by-unshared-user +++ b/tests/cwd-directory-not-accessible-by-unshared-user @@ -11,12 +11,12 @@ mkdir /tmp/debian-chroot chmod 700 /tmp/debian-chroot chown user:user /tmp/debian-chroot if [ "{{ CMD }}" = "./mmdebstrap" ]; then - CMD=$(realpath --canonicalize-existing ./mmdebstrap) + set -- "$(realpath --canonicalize-existing ./mmdebstrap)" elif [ "{{ CMD }}" = "perl -MDevel::Cover=-silent,-nogcov ./mmdebstrap" ]; then - CMD="perl -MDevel::Cover=-silent,-nogcov $(realpath --canonicalize-existing ./mmdebstrap)" + set -- perl -MDevel::Cover=-silent,-nogcov "$(realpath --canonicalize-existing ./mmdebstrap)" else - CMD="{{ CMD }}" + set -- {{ CMD }} fi -env --chdir=/tmp/debian-chroot runuser -u user -- $CMD --mode=unshare --variant=apt {{ DIST }} /tmp/debian-chroot.tar {{ MIRROR }} +env --chdir=/tmp/debian-chroot runuser -u user -- "$@" --mode=unshare --variant=apt {{ DIST }} /tmp/debian-chroot.tar {{ MIRROR }} tar -tf /tmp/debian-chroot.tar | sort | diff -u tar1.txt - rm /tmp/debian-chroot.tar