From 34b78c0e16086b9d38caa5c44c7127d1a344951a Mon Sep 17 00:00:00 2001 From: Ming Wen Date: Mon, 13 Jul 2026 16:16:38 +0800 Subject: [PATCH] fix(install.sh): guard rm -rf with ${SKILLS_DIR:?} (shellcheck SC2115) Defense-in-depth against an empty SKILLS_DIR expanding to a root-level path. Empty values are already rejected upstream; this makes it impossible by construction. One-char change, behavior otherwise identical. --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index add0ce4..a8c5b13 100755 --- a/install.sh +++ b/install.sh @@ -67,7 +67,7 @@ count=0 for dir in "$SRC"/*/; do [ -f "${dir}SKILL.md" ] || continue name="$(basename "$dir")" - rm -rf "${SKILLS_DIR}/${name}" + rm -rf "${SKILLS_DIR:?}/${name}" cp -R "$dir" "${SKILLS_DIR}/${name}" count=$((count + 1)) done