From: Eisuke Kawashima Date: Mon, 14 Jul 2025 08:10:59 +0000 (+0900) Subject: fix(SC2164): robust `cd` conditional X-Git-Tag: v258-rc1~57^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b371e7252cb165644960ce83a1df489169bca058;p=thirdparty%2Fsystemd.git fix(SC2164): robust `cd` conditional --- diff --git a/shell-completion/bash/kernel-install b/shell-completion/bash/kernel-install index 9d20b2fd055..70e9906e6ca 100644 --- a/shell-completion/bash/kernel-install +++ b/shell-completion/bash/kernel-install @@ -36,11 +36,11 @@ _kernel_install() { comps="add remove" ;; 2) - comps=$(cd /lib/modules; echo [0-9]*) + comps=$(cd /lib/modules && echo [0-9]*) if [[ ${COMP_WORDS[1]} == "remove" ]] && [[ -f /etc/machine-id ]]; then read -r MACHINE_ID < /etc/machine-id if [[ $MACHINE_ID ]] && ( [[ -d /boot/$MACHINE_ID ]] || [[ -L /boot/$MACHINE_ID ]] ); then - comps=$(cd "/boot/$MACHINE_ID"; echo [0-9]*) + comps=$(cd "/boot/$MACHINE_ID" && echo [0-9]*) fi fi ;;