Skip to content

Commit 3ae7ba8

Browse files
committed
fix install shell
1 parent fd1d8d7 commit 3ae7ba8

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.github/workflows/debug-install-shell.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747
run: |
4848
chmod +x install.sh
4949
./install.sh --install-dir "~/.snm-demo"
50-
# if [ ! -d ~/.snm-demo ]; then
51-
# echo "Error: ~/.snm-demo directory not found!"
52-
# exit 1
53-
# fi
50+
if [ ! -d ~/.snm-demo ]; then
51+
echo "Error: ~/.snm-demo directory not found!"
52+
exit 1
53+
fi
5454
ls -l ~/.snm-demo

install.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,13 @@ download_snm() {
7878
fi
7979
DOWNLOAD_DIR=$(mktemp -d)
8080
echo "Downloading $URL..."
81-
mkdir -p "$INSTALL_DIR" &>/dev/null
81+
# 创建安装目录
82+
if ! mkdir -p "$INSTALL_DIR" 2>/dev/null; then
83+
echo "Failed to create directory: $INSTALL_DIR"
84+
echo "Please check permissions and try again."
85+
exit 1
86+
fi
87+
8288
if ! curl --progress-bar --fail -L "$URL" -o "$DOWNLOAD_DIR/$FILENAME"; then
8389
echo "Download failed. Check that the release/filename are correct."
8490
exit 1

0 commit comments

Comments
 (0)