diff --git a/src/Core/ServiceWrapper/Main.cs b/src/Core/ServiceWrapper/Main.cs index 56a3c66..a56ae4d 100644 --- a/src/Core/ServiceWrapper/Main.cs +++ b/src/Core/ServiceWrapper/Main.cs @@ -532,7 +532,7 @@ namespace winsw /// Any unhandled 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();