mirror of
https://github.com/yuaotian/go-cursor-help.git
synced 2025-06-08 12:32:06 +08:00
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.
This commit is contained in:
parent
44226aebf1
commit
61392768a9
8
analysis
Normal file
8
analysis
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
1. 问题定位
|
||||||
|
- 错误发生在第68行附近的 `}` 处
|
||||||
|
- 这是一个 shell 脚本语法错误
|
||||||
|
- 检查发现是 check_requirements 函数中的花括号闭合问题
|
||||||
|
|
||||||
|
2. 解决方案
|
||||||
|
- 移除多余的花括号
|
||||||
|
- 确保函数语法正确
|
@ -65,7 +65,7 @@ check_requirements() {
|
|||||||
if [ ! -w "$INSTALL_DIR" ]; then
|
if [ ! -w "$INSTALL_DIR" ]; then
|
||||||
error "No write permission for $INSTALL_DIR. Please run with sudo." \
|
error "No write permission for $INSTALL_DIR. Please run with sudo." \
|
||||||
"没有 $INSTALL_DIR 的写入权限。请使用 sudo 运行此脚本。"
|
"没有 $INSTALL_DIR 的写入权限。请使用 sudo 运行此脚本。"
|
||||||
}
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Verify binary / 验证二进制文件
|
# Verify binary / 验证二进制文件
|
||||||
|
Loading…
x
Reference in New Issue
Block a user