From dc357e3501f15075fd5aeb2831fa9864291f6063 Mon Sep 17 00:00:00 2001 From: gator96100 Date: Sun, 2 Feb 2020 00:05:09 +0100 Subject: [PATCH] check for special characters in install path --- msys2/ps/user_setup.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/msys2/ps/user_setup.sh b/msys2/ps/user_setup.sh index 1094c153a..1cb342ac0 100644 --- a/msys2/ps/user_setup.sh +++ b/msys2/ps/user_setup.sh @@ -1,4 +1,8 @@ #!/bin/bash +if ! (echo "$PWD" | grep -Eq ^[a-zA-Z0-9\/\._\-]+$) ; then + echo "Error: Install path contains special characters!" + sleep infinity +fi MKPASSWD_CURRENT="$( mkpasswd -c )" MKGROUP_CURRENT="$( mkgroup -c )"