File tree 2 files changed +22
-2
lines changed
StabilityMatrix.Core/Processes
2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ All notable changes to Stability Matrix will be documented in this file.
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.1.0/ ) ,
6
6
and this project adheres to [ Semantic Versioning 2.0] ( https://semver.org/spec/v2.0.0.html ) .
7
7
8
+ ## v2.6.3
9
+ ### Fixed
10
+ - Fixed InvalidOperationException during prerequisite installs on certain platforms where process name and duration reporting are not supported
11
+
8
12
## v2.6.2
9
13
### Changed
10
14
- Backend changes for auto-update schema v3, supporting customizable release channels and faster downloads with zip compression
Original file line number Diff line number Diff line change @@ -204,13 +204,29 @@ public static async Task<ProcessResult> GetProcessResultAsync(
204
204
205
205
await process . WaitForExitAsync ( ) . ConfigureAwait ( false ) ;
206
206
207
+ string ? processName = null ;
208
+ TimeSpan elapsed = default ;
209
+
210
+ // Accessing these properties may throw an exception if the process has already exited
211
+ try
212
+ {
213
+ processName = process . ProcessName ;
214
+ }
215
+ catch ( SystemException ) { }
216
+
217
+ try
218
+ {
219
+ elapsed = process . ExitTime - process . StartTime ;
220
+ }
221
+ catch ( SystemException ) { }
222
+
207
223
return new ProcessResult
208
224
{
209
225
ExitCode = process . ExitCode ,
210
226
StandardOutput = stdout ,
211
227
StandardError = stderr ,
212
- ProcessName = process . MachineName ,
213
- Elapsed = process . ExitTime - process . StartTime
228
+ ProcessName = processName ,
229
+ Elapsed = elapsed
214
230
} ;
215
231
}
216
232
You can’t perform that action at this time.
0 commit comments