Skip to content

Commit

Permalink
added executeFSIWithArgsAndReturnMessages
Browse files Browse the repository at this point in the history
Added executeFSIWithArgsAndReturnMessages to coincide with existing executeFSIWithArgs and executeFSIWithScriptArgsAndReturnMessages functions. This brings inline functionality to give the caller a handle on messages generated on execution.
  • Loading branch information
pr-yemibedu authored Oct 24, 2017
1 parent 838f43e commit c828852
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/FakeLib/FSIHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@ let executeFSIWithArgs workingDirectory script extraFsiArgs env =
Thread.Sleep 1000
result = 0

/// Run the given build script with fsi.exe and allows for extra arguments to FSI. Returns output.
let executeFSIWithArgsAndReturnMessages workingDirectory script extraFsiArgs env =
let (result, messages) =
ExecProcessRedirected (fun startInfo ->
FsiStartInfo workingDirectory (FsiArgs(extraFsiArgs, script, [])) env startInfo) TimeSpan.MaxValue
Thread.Sleep 1000
(result, messages)

/// Run the given build script with fsi.exe and allows for extra arguments to the script. Returns output.
let executeFSIWithScriptArgsAndReturnMessages script (scriptArgs: string[]) =
let (result, messages) =
Expand Down

0 comments on commit c828852

Please sign in to comment.