Restrict characters to those supported by semvar_bash
This commit is contained in:
parent
d46682d1f2
commit
0f32102684
|
@ -58,8 +58,13 @@ major)
|
|||
minor)
|
||||
MINOR=$((MINOR+ 1))
|
||||
;;
|
||||
-[A-Za-z0-9]*$)
|
||||
SPECIAL="$1"
|
||||
-*)
|
||||
if [[ $1 =~ ^-[A-Za-z0-9]*$ ]]; then
|
||||
SPECIAL="$1"
|
||||
else
|
||||
echo "Error: Unsupported characters found in $1"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Error: unknown argument: $1"
|
||||
|
|
Loading…
Reference in New Issue