Skip to content

Commit

Permalink
Mac CI debugging (#2827)
Browse files Browse the repository at this point in the history
Debugging of #2814
Adds catching `PlatformNotSupportedException` and `NotSupportedException` on a process starting
  • Loading branch information
Thorium authored Sep 22, 2024
1 parent 8be4587 commit 96914ba
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app/Fake.Core.Process/Process.fs
Original file line number Diff line number Diff line change
Expand Up @@ -457,16 +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 -> false

if not hasExited then
if (not hasExited) && (Environment.isWindows || Trace.isVerbose false) then
Trace.traceFAKE "Error while retrieving StartTime of started process: %O" e

DateTime.Now
Expand Down

0 comments on commit 96914ba

Please sign in to comment.