Skip to content

Commit 49b2181

Browse files
committed
Windows easyrsa-shell-init.sh: Replace 'read -p'
Under Windows 11, 'read -p' crashes 'sh.exe'. Replace 'read -p' with 'echo $prompt; read'. Signed-off-by: Richard T Bonhomme <[email protected]>
1 parent ce3a354 commit 49b2181

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

distro/windows/bin/easyrsa-shell-init.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ for f in $extern_list; do
2727
echo " files."
2828
echo ""
2929
#shellcheck disable=SC2162
30-
read -p "Press Enter or CTRL-C to exit."
30+
echo "Press Enter to exit."
31+
read
3132
exit 1
3233
fi
3334
done
@@ -55,7 +56,8 @@ full administrator privileges via Windows User Access Control."
5556
echo ""
5657

5758
#shellcheck disable=SC2162
58-
read -p "Press Enter or CTRL-C to exit."
59+
echo "Press Enter to exit."
60+
read
5961
exit 1
6062
}
6163

@@ -128,8 +130,9 @@ fi
128130

129131
[ -f "$setup_path/easyrsa" ] || {
130132
echo "Missing easyrsa script. Expected to find it at: $setup_path/easyrsa"
131-
read -p "Press Enter or CTRL-C to exit."
132-
exit 2
133+
echo "Press Enter to exit."
134+
read
135+
exit 1
133136
}
134137

135138
# Set prompt and welcome message

0 commit comments

Comments
 (0)