Merge pull request #420 from NextTurn/cli

Revert CLI behaviors in non-interactive mode
pull/403/head v2.6.2
Oleg Nenashev 2020-02-24 16:38:51 +01:00 committed by GitHub
commit 2d1ffbacfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -532,7 +532,7 @@ namespace winsw
/// <exception cref="Exception">Any unhandled exception</exception>
public static void Run(string[] _args, ServiceDescriptor? descriptor = null)
{
bool inCliMode = Console.OpenStandardInput() != Stream.Null;
bool inCliMode = _args.Length > 0;
// If descriptor is not specified, initialize the new one (and load configs from there)
descriptor ??= new ServiceDescriptor();