Created
August 29, 2012 20:27
-
-
Save bentayloruk/3518432 to your computer and use it in GitHub Desktop.
F# Learning - Concat sequences
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EnvironmentHelper.fs | |
let isUnix = System.Environment.OSVersion.Platform = System.PlatformID.Unix | |
let platformInfoAction (psi:ProcessStartInfo) = | |
if isUnix && psi.FileName.EndsWith ".exe" then | |
psi.Arguments <- psi.FileName + " " + psi.Arguments | |
psi.FileName <- "mono" | |
ProcessHelper.fs | |
/// Runs the given process and returns the exit code | |
let ExecProcessWithLambdas infoAction (timeOut:TimeSpan) silent errorF messageF = | |
use p = new Process() | |
p.StartInfo.UseShellExecute <- false | |
[infoAction; platformStartInfoAction] |> Seq.iter (fun action -> action p.StartInfo) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FYI; The original version got pulled in, so not sure if you want to submit this as a further pull request Ben?