fix(shell): use [[ instead of [ for conditional tests

Replace single brackets with double brackets in bash conditional
expressions across 14 files (28 changes). All scripts use bash
shebangs so [[ is safe everywhere (SonarCloud rule shelldre:S7688).
This commit is contained in:
2026-02-07 13:59:08 +02:00
parent 89aeb29c04
commit 63a21d08b4
14 changed files with 27 additions and 27 deletions

View File

@@ -54,7 +54,7 @@ remove_old_submodule() {
local name="$1" path="$2"
# Remove working tree
if [ -d "$path" ]; then
if [[ -d "$path" ]]; then
rm -rf "$path"
_log "Removed $path"
fi
@@ -66,13 +66,13 @@ remove_old_submodule() {
git config --remove-section "submodule.$path" 2> /dev/null || true
# Skip name-based cleanup if no submodule name provided
[ -z "$name" ] && return 0
[[ -z "$name" ]] && return 0
# Remove .git/config section keyed by name
git config --remove-section "submodule.$name" 2> /dev/null || true
# Remove .git/modules/<name>/ cached repository
if [ -d ".git/modules/$name" ]; then
if [[ -d ".git/modules/$name" ]]; then
rm -rf ".git/modules/$name"
_log "Removed .git/modules/$name"
fi