From c8288523fece0d06a9cc6eab7db777d3461c48f4 Mon Sep 17 00:00:00 2001 From: "Yemi Bedu @ P&R" Date: Tue, 24 Oct 2017 11:59:31 -0400 Subject: [PATCH] added executeFSIWithArgsAndReturnMessages 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. --- src/app/FakeLib/FSIHelper.fs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app/FakeLib/FSIHelper.fs b/src/app/FakeLib/FSIHelper.fs index 771c28e3f36..61ba851d89e 100644 --- a/src/app/FakeLib/FSIHelper.fs +++ b/src/app/FakeLib/FSIHelper.fs @@ -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) =