Skip to content

fix: 安装脚本提前检查 Bash 版本#2447

Open
wucm667 wants to merge 1 commit into
Wei-Shaw:mainfrom
wucm667:codex/issue-2428-bash3-install
Open

fix: 安装脚本提前检查 Bash 版本#2447
wucm667 wants to merge 1 commit into
Wei-Shaw:mainfrom
wucm667:codex/issue-2428-bash3-install

Conversation

@wucm667
Copy link
Copy Markdown
Contributor

@wucm667 wucm667 commented May 14, 2026

变更内容

  • 在 install.sh 顶部新增 Bash 4+ 版本检查,确保在 declare -A 执行前给出清晰错误
  • 兼容非 Bash 或 Bash 3 环境,避免安装时出现 declare: -A: invalid option

验证

  • bash -n deploy/install.sh
  • /bin/bash deploy/install.sh --help(Bash 3,确认提前提示)
  • /opt/homebrew/bin/bash deploy/install.sh --help(Bash 5.3,确认帮助页正常)

Fixes #2428

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

安装失败 bash: line 37: declare: -A: invalid option

1 participant