Skip to content

Commit 797e579

Browse files
committed
Do not attempt to run as a service if running under mono
1 parent fe1085b commit 797e579

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

IntegrationEngine.ConsoleHost/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ public class Program
1111
public static EngineHost EngineHosts { get; set; }
1212
public static void Main(string[] args)
1313
{
14-
if (!Environment.UserInteractive)
14+
var isRunningUnderMono = Type.GetType("Mono.Runtime") != null;
15+
if (!Environment.UserInteractive && !isRunningUnderMono)
1516
{
1617
// Set current working directory as services use the system directory by default.
1718
Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);

0 commit comments

Comments
 (0)