Skip to content

Commit 6139276

Browse files
committed
fix: Correct syntax error in install.sh
- Fixed a syntax error in the `check_requirements` function by replacing the incorrect closing brace with `fi`. - This change ensures proper script execution and improves error handling for user permissions. This commit addresses a critical issue in the installation script to enhance reliability.
1 parent 44226ae commit 6139276

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

analysis

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
1. 问题定位
2+
- 错误发生在第68行附近的 `}` 处
3+
- 这是一个 shell 脚本语法错误
4+
- 检查发现是 check_requirements 函数中的花括号闭合问题
5+
6+
2. 解决方案
7+
- 移除多余的花括号
8+
- 确保函数语法正确

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ check_requirements() {
6565
if [ ! -w "$INSTALL_DIR" ]; then
6666
error "No write permission for $INSTALL_DIR. Please run with sudo." \
6767
"没有 $INSTALL_DIR 的写入权限。请使用 sudo 运行此脚本。"
68-
}
68+
fi
6969
}
7070

7171
# Verify binary / 验证二进制文件

0 commit comments

Comments
 (0)