We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95c3a0b commit bba631dCopy full SHA for bba631d
1 file changed
functions/gnu_generic_getopts
@@ -7,7 +7,7 @@ function gnu_generic_getopts() {
7
8
if [[ "$1" == "-" ]]; then
9
builtin declare -g HELP_MESSAGE
10
- IFS= builtin read -rd '' HELP_MESSAGE
+ IFS= builtin read -rd '' HELP_MESSAGE || true
11
exec 6< <(builtin echo "$HELP_MESSAGE")
12
else
13
builtin declare app="${1:?The function parse_gnu_help requires a function/command which outputs the GNU-compatibled help message}";
@@ -19,7 +19,7 @@ function gnu_generic_getopts() {
19
builtin shift
20
OPTIONS[help]=true
21
ARGUMENTS=("$@")
22
- IFS= builtin read -u 6 -rd '' HELP_MESSAGE
+ IFS= builtin read -u 6 -rd '' HELP_MESSAGE || true
23
builtin echo "$HELP_MESSAGE"
24
builtin return 1
25
fi
0 commit comments