dsh_banner_probe in install.sh aborts on stock macOS (bash 3.2, no timeout in coreutils) because it expands an array that can be empty under set -u:
dsh_banner_probe() {
local runner=()
ifcommand -v timeout &>/dev/null;then runner=(timeout 5);fi"${runner[@]}""$1" --help </dev/null 2>/dev/null | grep -qi "DeepSeek Harness"
}install.sh#L650-L656
Repro
On a machine with no timeout binary (stock macOS; GNU coreutils' timeout is what's usually missing there), runner stays the empty array (). install.sh runs under set -euo pipefail, and expanding an empty array under set -u is a runtime abort in bash 3.2 — even with "${runner[@]}", which is the usual safe idiom on bash 4+ but not on 3.2. bash -n install.sh cannot see this: it's a runtime failure, not a syntax error, and only shows up when _cli_candidate_ok reaches the deepseek) dsh_banner_probe "$2" ;; branch — i.e. whenever the installer or its detection path tries to identify a dsh candidate.
Where this was found
Found while working on #380 (CLI catalogue for install.sh + the Docker agent image), which added a real bash:3.2 CI job for the first time. dsh_banner_probe predates that PR and is untouched by it, so it's reported separately rather than folded into that diff.
Suggested fix
Guard the expansion the way the rest of install.sh already does elsewhere for bash-3.2-safe optional arrays — e.g. only expand when non-empty:
dsh_banner_probe() {
local runner=()
ifcommand -v timeout &>/dev/null;then runner=(timeout 5);fiif [[ ${#runner[@]}-gt 0 ]];then"${runner[@]}""$1" --help </dev/null 2>/dev/null | grep -qi "DeepSeek Harness"else"$1" --help </dev/null 2>/dev/null | grep -qi "DeepSeek Harness"fi
}Happy to send a PR if useful — flagging first since it's unrelated to what #380 touches.
🤖 Generated with Claude Code
dsh_banner_probeininstall.shaborts on stock macOS (bash 3.2, notimeoutin coreutils) because it expands an array that can be empty underset -u:install.sh#L650-L656
Repro
On a machine with no
timeoutbinary (stock macOS; GNU coreutils'timeoutis what's usually missing there),runnerstays the empty array().install.shruns underset -euo pipefail, and expanding an empty array underset -uis a runtime abort in bash 3.2 — even with"${runner[@]}", which is the usual safe idiom on bash 4+ but not on 3.2.bash -n install.shcannot see this: it's a runtime failure, not a syntax error, and only shows up when_cli_candidate_okreaches thedeepseek) dsh_banner_probe "$2" ;;branch — i.e. whenever the installer or its detection path tries to identify adshcandidate.Where this was found
Found while working on #380 (CLI catalogue for
install.sh+ the Docker agent image), which added a realbash:3.2CI job for the first time.dsh_banner_probepredates that PR and is untouched by it, so it's reported separately rather than folded into that diff.Suggested fix
Guard the expansion the way the rest of
install.shalready does elsewhere for bash-3.2-safe optional arrays — e.g. only expand when non-empty:Happy to send a PR if useful — flagging first since it's unrelated to what #380 touches.
🤖 Generated with Claude Code