mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-10 22:50:32 +00:00
Fix main.sh: bail on semver operators (#26)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
3
main.sh
3
main.sh
@@ -164,6 +164,9 @@ fi
|
|||||||
for tool in "${tools[@]}"; do
|
for tool in "${tools[@]}"; do
|
||||||
if [[ "${tool}" == *"@"* ]]; then
|
if [[ "${tool}" == *"@"* ]]; then
|
||||||
version="${tool#*@}"
|
version="${tool#*@}"
|
||||||
|
if [[ ! "${version}" =~ ^([1-9][0-9]*(\.[0-9]+(\.[0-9]+)?)?|0\.[1-9][0-9]*(\.[0-9]+)?|^0\.0\.[0-9]+)(-[0-9A-Za-z\.-]+)?(\+[0-9A-Za-z\.-]+)?$|^latest$ ]]; then
|
||||||
|
bail "takie-e/install-action does not support semver operators"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
version="latest"
|
version="latest"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user