From 70636b802310918daed080bbbdf675d423931c99 Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Sun, 31 Mar 2024 03:17:08 +0100 Subject: [PATCH 1/2] easyrsa_mkdir_p(): Ignore 'mkdir.exe' error code in favor of 'test' Windows 11 does not recognise errors generated by 'mkdir.exe'. Ignore errors generated by 'mkdir.exe' and test the existence of the newly created directory. Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 7ffba60eb..f3f05b0b0 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -806,13 +806,15 @@ easyrsa_mkdir_p() { if [ -d "$1" ]; then : # ok else - mkdir "$1" || die "(1) easyrsa_mkdir_p: $1" + mkdir "$1" + [ -d "$1" ] || die "(1) easyrsa_mkdir_p: $1" fi if [ -d "$1/$2" ]; then return 0 # Exists ok else - mkdir "$1/$2" && return 0 # Exists now + mkdir "$1/$2" + [ -d "$1/$2" ] && return 0 # Exists now fi die "(2) easyrsa_mkdir_p: $1/$2" } # => easyrsa_mkdir_p() From e23de4d084f7a484d54161ffbe7d70ca452586b2 Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Sun, 31 Mar 2024 03:30:59 +0100 Subject: [PATCH 2/2] Windows, easyrsa-shell-init.sh: Remove stray quote Signed-off-by: Richard T Bonhomme --- distro/windows/bin/easyrsa-shell-init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distro/windows/bin/easyrsa-shell-init.sh b/distro/windows/bin/easyrsa-shell-init.sh index a3559bb2a..7e543b00f 100644 --- a/distro/windows/bin/easyrsa-shell-init.sh +++ b/distro/windows/bin/easyrsa-shell-init.sh @@ -65,7 +65,7 @@ Please try using one of the following solutions: These will start EasyRSA in your user's 'home directory/easy-rsa' -Press enter to exit." +Press enter to exit. ACCESS_DENIED_MSG #shellcheck disable=SC2162