From 735cdfe5d664191ee7755f203c0f4d6aa4c97bad Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Tue, 13 Aug 2013 21:25:38 -0700 Subject: [PATCH] use mono to start process if in linux. --- NzbDrone.Common/ProcessProvider.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/NzbDrone.Common/ProcessProvider.cs b/NzbDrone.Common/ProcessProvider.cs index fe1120411..fd11e1bce 100644 --- a/NzbDrone.Common/ProcessProvider.cs +++ b/NzbDrone.Common/ProcessProvider.cs @@ -4,6 +4,7 @@ using System.Diagnostics; using System.IO; using System.Linq; using NLog; +using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.Model; namespace NzbDrone.Common @@ -82,6 +83,13 @@ namespace NzbDrone.Common public Process ShellExecute(string path, string args = null, Action onOutputDataReceived = null, Action onErrorDataReceived = null) { + + if (OsInfo.IsMono && path.EndsWith(".exe", StringComparison.InvariantCultureIgnoreCase)) + { + args = path + " " + args; + path = "mono"; + } + var logger = LogManager.GetLogger(new FileInfo(path).Name); var startInfo = new ProcessStartInfo(path, args)