From e3c58ef839b4939503cc2da8859f92e28aa3b037 Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 18 Jul 2018 12:26:12 +0200 Subject: monogame-patcher: Return exitcode 1 on CLI error If there is a command line usage error, we really don't want the program to return exit status 0 (success), so let's actually set the return value on WithParsed(). Signed-off-by: aszlig --- pkgs/games/build-support/monogame-patcher/src/test.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pkgs/games/build-support/monogame-patcher/src/test.sh') diff --git a/pkgs/games/build-support/monogame-patcher/src/test.sh b/pkgs/games/build-support/monogame-patcher/src/test.sh index a4f65aef..b7380f27 100644 --- a/pkgs/games/build-support/monogame-patcher/src/test.sh +++ b/pkgs/games/build-support/monogame-patcher/src/test.sh @@ -99,4 +99,13 @@ test "$(mono subdir/test2.exe)" = "can write" test "$(mono subdir/test2.exe)" = "can not write" +set +e +"$out/bin/monogame-patcher" --help &> /dev/null +ret=$? +set -e +if [ $ret -eq 0 ]; then + echo "Running with --help should give exit status != 0 but was $ret" >&2 + exit 1 +fi + "$out/bin/monogame-patcher" --help 2>&1 | grep -q fix-filestreams -- cgit 1.4.1