Skip to content

Instantly share code, notes, and snippets.

@bentayloruk
Created August 29, 2012 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bentayloruk/3518432 to your computer and use it in GitHub Desktop.
Save bentayloruk/3518432 to your computer and use it in GitHub Desktop.
F# Learning - Concat sequences
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)
@ianbattersby
Copy link

FYI; The original version got pulled in, so not sure if you want to submit this as a further pull request Ben?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment