From bedce7425b6c1a771c2af21b589bcab2828524cb Mon Sep 17 00:00:00 2001 From: Xx Date: Wed, 11 Dec 2024 17:12:51 +0800 Subject: [PATCH] fix: Correct closing syntax in install.sh and improve error message - Fixed a syntax error by replacing the incorrect closing brace with `fi` in the `verify_binary` function. - Updated the error message for setting executable permissions to ensure proper display without encoding issues. This commit enhances the reliability of the installation script by correcting syntax and improving user feedback. --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index f023ee6..5ec48c0 100644 --- a/install.sh +++ b/install.sh @@ -81,7 +81,7 @@ verify_binary() { if [ "$size" -lt 1000000 ]; then # At least 1MB / 至少1MB error "Downloaded file size is abnormal, download might be incomplete" \ "下载的文件大小异常,可能下载不完整" - } + fi } # Main installation process / 主安装流程 @@ -116,7 +116,7 @@ main() { # Set permissions / 设置权限 info "Setting execution permissions..." "正在设置执行权限..." if ! chmod +x "$TEMP_DIR/$BINARY_NAME"; then - error "Failed to set executable permissions" "无法设置可执行权限" + error "Failed to set executable permissions" "无法设置可执行权���" fi # Handle macOS security / 处理macOS安全设置