Starting processes in "FAKE - F# Make"

Note: This documentation is for FAKE 5!

API-Reference

Running a command and analyse results

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
let fakeToolPath = "known/path/to/fake.exe"
let directFakeInPath command workingDir target =
    let result =
        Process.ExecProcessAndReturnMessages (fun (info:Process.ProcStartInfo) ->
          { info with
                FileName = fakeToolPath
                WorkingDirectory = workingDir
                Arguments = command }
          |> Process.setEnvironmentVariable "target" target) (System.TimeSpan.FromMinutes 15.)
    if result.ExitCode <> 0 then 
        let errors = String.Join(Environment.NewLine,result.Errors)
        printfn "%s" <| String.Join(Environment.NewLine,result.Messages)
        failwithf "FAKE Process exited with %d: %s" result.ExitCode errors
    String.Join(Environment.NewLine,result.Messages)

let output = directFakeInPath "--version" "." "All"
val fakeToolPath : string

Full name: coreprocess.fakeToolPath
val directFakeInPath : command:'a -> workingDir:'b -> target:'c -> 'd

Full name: coreprocess.directFakeInPath
val command : 'a
val workingDir : 'b
val target : 'c
val result : obj
namespace System
Multiple items
type TimeSpan =
  struct
    new : ticks:int64 -> TimeSpan + 3 overloads
    member Add : ts:TimeSpan -> TimeSpan
    member CompareTo : value:obj -> int + 1 overload
    member Days : int
    member Duration : unit -> TimeSpan
    member Equals : value:obj -> bool + 1 overload
    member GetHashCode : unit -> int
    member Hours : int
    member Milliseconds : int
    member Minutes : int
    ...
  end

Full name: System.TimeSpan

--------------------
System.TimeSpan ()
System.TimeSpan(ticks: int64) : unit
System.TimeSpan(hours: int, minutes: int, seconds: int) : unit
System.TimeSpan(days: int, hours: int, minutes: int, seconds: int) : unit
System.TimeSpan(days: int, hours: int, minutes: int, seconds: int, milliseconds: int) : unit
System.TimeSpan.FromMinutes(value: float) : System.TimeSpan
val errors : string
module String

from Microsoft.FSharp.Core
val printfn : format:Printf.TextWriterFormat<'T> -> 'T

Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.printfn
val failwithf : format:Printf.StringFormat<'T,'Result> -> 'T

Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.failwithf
val output : obj

Full name: coreprocess.output