Skip to content

Commit

Permalink
Debugging fsprojects#2814
Browse files Browse the repository at this point in the history
  • Loading branch information
Thorium committed Sep 22, 2024
1 parent 3a3e00c commit 5fec7ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
printfn "Hello FAKE"
printfn "Hello FAKE"
System.Threading.Thread.Sleep 500
7 changes: 6 additions & 1 deletion src/app/Fake.Core.Process/Process.fs
Original file line number Diff line number Diff line change
Expand Up @@ -457,14 +457,19 @@ module Process =
try
proc.StartTime
with
| :? PlatformNotSupportedException
| :? NotSupportedException
| :? InvalidOperationException
| :? System.ComponentModel.Win32Exception as e ->
let hasExited =
try
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
Expand Down

0 comments on commit 5fec7ce

Please sign in to comment.