Skip to content

Commit a83ef56

Browse files
committed
Fix UUID validity check for bash
bash patterns require the right-hand side to be unquoted.
1 parent 99a9e95 commit a83ef56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xr.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function _src_track() {
7676

7777
# Tests whether the given string is a valid UUID or not.
7878
function _is_uuid() {
79-
[[ "$1" =~ '^[a-z0-9]{32}$' ]]
79+
[[ "$1" =~ ^[[:xdigit:]]{32}$ ]]
8080
}
8181

8282
# Public function.

0 commit comments

Comments
 (0)