From 704507c9bfd93a23d1a09fc7ac2dec228da2194c Mon Sep 17 00:00:00 2001 From: Basuotian <93654253+basuotian@users.noreply.github.com> Date: Tue, 11 Jan 2022 11:27:15 +0800 Subject: [PATCH] Fix: incorrect output for vela cli installation (#423) (#424) Signed-off-by: Shuai Tian --- static/script/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/script/install.sh b/static/script/install.sh index 23780260f73..4e31de6ede1 100644 --- a/static/script/install.sh +++ b/static/script/install.sh @@ -133,10 +133,10 @@ installFile() { chmod o+x $tmp_root_vela_cli runAsRoot cp "$tmp_root_vela_cli" "$VELA_INSTALL_DIR" - if [ -f "$VELA_CLI_FILE" ]; then + if [ $? -eq 0 ] && [ -f "$VELA_CLI_FILE" ]; then echo "$VELA_CLI_FILENAME installed into $VELA_INSTALL_DIR successfully." - $VELA_CLI_FILE --version + $VELA_CLI_FILE version else echo "Failed to install $VELA_CLI_FILENAME" exit 1