From 5fec7ce1920d576ce0fc75e9a9885766949f9180 Mon Sep 17 00:00:00 2001 From: Tuomas Hietanen Date: Sun, 22 Sep 2024 11:20:35 +0100 Subject: [PATCH] Debugging #2814 --- .../before/hello_world.fsx | 3 ++- src/app/Fake.Core.Process/Process.fs | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/integrationtests/core-no-dependencies-hello-world/before/hello_world.fsx b/integrationtests/core-no-dependencies-hello-world/before/hello_world.fsx index fddb0bc0e8e..37f78c9dd48 100644 --- a/integrationtests/core-no-dependencies-hello-world/before/hello_world.fsx +++ b/integrationtests/core-no-dependencies-hello-world/before/hello_world.fsx @@ -1 +1,2 @@ -printfn "Hello FAKE" \ No newline at end of file +printfn "Hello FAKE" +System.Threading.Thread.Sleep 500 \ No newline at end of file diff --git a/src/app/Fake.Core.Process/Process.fs b/src/app/Fake.Core.Process/Process.fs index b699dd7c8c6..77794c057c8 100644 --- a/src/app/Fake.Core.Process/Process.fs +++ b/src/app/Fake.Core.Process/Process.fs @@ -457,6 +457,8 @@ module Process = try proc.StartTime with + | :? PlatformNotSupportedException + | :? NotSupportedException | :? InvalidOperationException | :? System.ComponentModel.Win32Exception as e -> let hasExited = @@ -464,7 +466,10 @@ module Process = proc.HasExited with | :? InvalidOperationException - | :? System.ComponentModel.Win32Exception -> false + | :? NotSupportedException + | :? System.ComponentModel.Win32Exception as e2 -> + Trace.traceFAKE "Error while retrieving HasExited of process: %O" e2 + false if not hasExited then Trace.traceFAKE "Error while retrieving StartTime of started process: %O" e