diff --git a/src/app/FakeLib/EnvironmentHelper.fs b/src/app/FakeLib/EnvironmentHelper.fs index 39f9028226a..5755ada6ce4 100644 --- a/src/app/FakeLib/EnvironmentHelper.fs +++ b/src/app/FakeLib/EnvironmentHelper.fs @@ -127,6 +127,12 @@ let isLinux = int System.Environment.OSVersion.Platform |> fun p -> (p = 4) || ( /// Todo: Detect mono on windows let isMono = isLinux || isUnix || isMacOS +let monoPath = + if isMacOS && File.Exists "/Library/Frameworks/Mono.framework/Commands/mono" then + "/Library/Frameworks/Mono.framework/Commands/mono" + else + "mono" + /// Arguments on the Mono executable let mutable monoArguments = "" @@ -134,7 +140,7 @@ let mutable monoArguments = "" let platformInfoAction (psi : ProcessStartInfo) = if isMono && psi.FileName.EndsWith ".exe" then psi.Arguments <- monoArguments + " " + psi.FileName + " " + psi.Arguments - psi.FileName <- "mono" + psi.FileName <- monoPath /// The path of the current target platform let mutable TargetPlatformPrefix = diff --git a/src/app/FakeLib/ProcessHelper.fs b/src/app/FakeLib/ProcessHelper.fs index 961d0947e48..2df1f9fcc52 100644 --- a/src/app/FakeLib/ProcessHelper.fs +++ b/src/app/FakeLib/ProcessHelper.fs @@ -17,7 +17,7 @@ let startedProcesses = HashSet() let start (proc : Process) = if isMono && proc.StartInfo.FileName.ToLowerInvariant().EndsWith(".exe") then proc.StartInfo.Arguments <- "--debug \"" + proc.StartInfo.FileName + "\" " + proc.StartInfo.Arguments - proc.StartInfo.FileName <- "mono" + proc.StartInfo.FileName <- monoPath proc.Start() |> ignore startedProcesses.Add(proc.Id, proc.StartTime) |> ignore