File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 55# Contributors : Aoran Zeng <[email protected] >66# |
77# Created On : <2024-10-26>
8- # Last Modified : <2024-12-08 >
8+ # Last Modified : <2025-03-07 >
99#
1010# chsrc installer for Windows
1111# ---------------------------------------------------------------
@@ -96,10 +96,10 @@ function Set_Install_Dir {
9696}
9797
9898function Set_Version {
99- $pattern = ' ^(0\.1 \.[4 -9]|pre)$'
99+ $pattern = ' ^(0\.[1-9] \.[0 -9]|pre)$'
100100
101101 if ($Version -notmatch $pattern ) {
102- output_error " Invalid version '$Version '. Please provide a valid version (0.1.4 - 0.1.9 or 'pre'). "
102+ output_error " Invalid version '$Version '. Please provide a valid version: 0.x.y (>= 0.1.4) or 'pre'"
103103 }
104104
105105 # 设置版本号
Original file line number Diff line number Diff line change 77# Contributors : Aoran Zeng <[email protected] >88# |
99# Created On : <2024-10-25>
10- # Last Modified : <2024-12-08 >
10+ # Last Modified : <2025-03-07 >
1111#
1212# chsrc installer for Linux & macOS
1313# ---------------------------------------------------------------
@@ -157,12 +157,12 @@ install() {
157157 ;;
158158 esac
159159
160- if [[ ! " $userOpt_version " =~ ^(pre| 0\. 1 \. ([4 -9]))$ ]]; then
160+ if [[ ! " $userOpt_version " =~ ^(pre| 0\. ([1-9]) \. ([0 -9]))$ ]]; then
161161 # version 不符合条件,报错
162162 if [ " $userOpt_lang " = " zh" ]; then
163- error " 不支持的版本: ${userOpt_version} ,版本号必须在 0.1.4 到 0.1.9 之间或为 'pre'"
163+ error " 不支持的版本: ${userOpt_version} ,版本号必须为 0.x.y (>= 0.1.4) 或 'pre'"
164164 else
165- error " Unsupported version: ${userOpt_version} . Version number must be between 0.1.4 and 0.1.9 or 'pre'"
165+ error " Unsupported version: ${userOpt_version} . Version number must be 0.x.y (>= 0.1.4) or 'pre'"
166166 fi
167167 fi
168168
You can’t perform that action at this time.
0 commit comments