Improved help text and output errors to stderr

Addressed review comments from JustAMan.
This commit is contained in:
PloughPuff
2019-01-29 13:34:59 +00:00
committed by Bond-009
parent 211ae30188
commit b5e8cce4cf
2 changed files with 6 additions and 9 deletions

View File

@@ -49,11 +49,8 @@ namespace Jellyfin.Server
args[i] = regex.Replace(args[i], substitution);
}
// For CommandLine package, change default behaviour to output errors to stdout (instead of stderr)
var parser = new Parser(config => config.HelpWriter = Console.Out);
// Parse the command line arguments and either start the app or exit indicating error
await parser.ParseArguments<StartupOptions>(args)
await Parser.Default.ParseArguments<StartupOptions>(args)
.MapResult(
options => StartApp(options),
errs => Task.FromResult(0)).ConfigureAwait(false);