Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contrib/nicolal/argbash fix set errexit #173

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ Bianca Tamayo <hi@biancatamayo.me>
Conduitry <git@chor.date>
Felipe Santos
Matěj Týč <matej.tyc@gmail.com>
Nicola Lunghi <nick83ola@gmail.com>
Stephen Gallagher <sgallagh@redhat.com>
4 changes: 2 additions & 2 deletions src/function_generators.m4
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ m4_define([_MAKE_RESTRICT_VALUES_FUNCTION], [MAKE_FUNCTION(
_INDENT_()[@S|@2: The passed value]],
[evaluate_strictness],
[_INDENT_()_CASE_RESTRICT_VALUES([],
[@<:@@<:@ "@S|@2" =~ ^-(-(m4_list_join([_ARGS_LONG], [|]))$|m4_dquote(m4_list_join([_ARGS_SHORT], []))) @:>@@:>@ && die "You have passed '@S|@2' as a value of argument '@S|@1', which makes it look like that you have omitted the actual value, since '@S|@2' is an option accepted by this script. This is considered a fatal error."],
[@<:@@<:@ "@S|@2" =~ ^--?@<:@a-zA-Z@:>@ @:>@@:>@ && die "You have passed '@S|@2' as a value of argument '@S|@1'. It looks like that you are trying to pass an option instead of the actual value, which is considered a fatal error."])_ENDL_()],
[ ! @<:@@<:@ "@S|@2" =~ ^-(-(m4_list_join([_ARGS_LONG], [|]))$|m4_dquote(m4_list_join([_ARGS_SHORT], []))) @:>@@:>@ || die "You have passed '@S|@2' as a value of argument '@S|@1', which makes it look like that you have omitted the actual value, since '@S|@2' is an option accepted by this script. This is considered a fatal error."],
[ ! @<:@@<:@ "@S|@2" =~ ^--?@<:@a-zA-Z@:>@ @:>@@:>@ || die "You have passed '@S|@2' as a value of argument '@S|@1'. It looks like that you are trying to pass an option instead of the actual value, which is considered a fatal error."])_ENDL_()],
)])


Expand Down
1 change: 1 addition & 0 deletions tests/regressiontests/basic.m4
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ m4_define([opt_arg_help], [m4_fatal([The option 'opt_arg' help string got expand
# ARG_OPTIONAL_SINGLE([opt_arg], o, [opt_arg_help O percent: %], [opt_arg_default lolo])
# ARG_USE_ENV([FOO], [foo], [help on foo])
# ARG_USE_PROGRAM([make], [MAKE], [Please install GNU make to use this test], [The GNU make utility])
# ARG_RESTRICT_VALUES([no-local-options])
# ARG_DEFAULTS_POS()
# ARG_VERSION([echo "$0 FOO"])
# ARG_OPTIONAL_BOOLEAN(boo_l, b)
Expand Down