Skip to content

Commit f60ab54

Browse files
wickdynexccmywish
authored andcommitted
<fix>: fix bash installer bug.
1 parent 787b27c commit f60ab54

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tool/installer.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ tmp_created_install_dir=""
2626
userOpt_version="pre"
2727
userOpt_help=0
2828
userOpt_lang="zh"
29+
version_prefix="v"
2930

3031

3132

@@ -166,6 +167,11 @@ install() {
166167
fi
167168
fi
168169

170+
# version 版本不是 'pre',添加'v'前缀
171+
if [[ "$userOpt_version" =~ ^(0\.([1-9])\.([0-9]))$ ]]; then
172+
userOpt_version="${version_prefix}${userOpt_version}"
173+
fi
174+
169175
url="https://gitee.com/RubyMetric/chsrc/releases/download/${userOpt_version}/${binary_name}-${arch}-${platform}"
170176

171177
path_to_executable="${userOpt_install_dir}/${binary_name}"

0 commit comments

Comments
 (0)