<fix>: fix bash installer bug.

This commit is contained in:
YiXuan Ding 2025-03-18 22:55:27 +08:00 committed by ccmywish
parent 787b27c36d
commit f60ab545da

View File

@ -26,6 +26,7 @@ tmp_created_install_dir=""
userOpt_version="pre"
userOpt_help=0
userOpt_lang="zh"
version_prefix="v"
@ -166,6 +167,11 @@ install() {
fi
fi
# version 版本不是 'pre',添加'v'前缀
if [[ "$userOpt_version" =~ ^(0\.([1-9])\.([0-9]))$ ]]; then
userOpt_version="${version_prefix}${userOpt_version}"
fi
url="https://gitee.com/RubyMetric/chsrc/releases/download/${userOpt_version}/${binary_name}-${arch}-${platform}"
path_to_executable="${userOpt_install_dir}/${binary_name}"