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/patcher.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pkgs/games/build-support/monogame-patcher/src/patcher.cs') diff --git a/pkgs/games/build-support/monogame-patcher/src/patcher.cs b/pkgs/games/build-support/monogame-patcher/src/patcher.cs index 8e4f8ddd..bf572d9c 100644 --- a/pkgs/games/build-support/monogame-patcher/src/patcher.cs +++ b/pkgs/games/build-support/monogame-patcher/src/patcher.cs @@ -170,9 +170,11 @@ public class patcher { settings.MaximumDisplayWidth = 80; }); + var retval = 0; parser.ParseArguments(args) .WithParsed(opts => new FixFileStreams(opts)) - .WithParsed(opts => new ReplaceCall(opts)); - return 0; + .WithParsed(opts => new ReplaceCall(opts)) + .WithNotParsed(_ => retval = 1); + return retval; } } -- cgit 1.4.1