File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 21
21
if ($installProcess.Err ) {
22
22
return $installProcess
23
23
} else {
24
+ [array ]$LogMessage = if ($Log = Get-Content - LiteralPath " $PackageDirectory \winuptp.log" - ErrorAction SilentlyContinue) {
25
+ $NonEmptyPredicate = [Predicate [string ]] { -not [string ]::IsNullOrWhiteSpace($args [0 ]) }
26
+
27
+ $LogFirstNonEmpty = [array ]::FindIndex([string []]$Log , $NonEmptyPredicate )
28
+ if ($LogFirstNonEmpty -ne -1 ) {
29
+ $LogLastNonEmpty = [array ]::FindLastIndex([string []]$Log , $NonEmptyPredicate )
30
+ $Log [$LogFirstNonEmpty .. $LogLastNonEmpty ]
31
+ }
32
+ }
33
+
24
34
return [ExternalProcessResult ]::new(
25
35
$installProcess.Err ,
26
36
[BiosUpdateInfo ]@ {
31
41
' ExitCode' = $installProcess.Info.ExitCode
32
42
' StandardOutput' = $installProcess.Info.StandardOutput
33
43
' StandardError' = $installProcess.Info.StandardError
34
- ' LogMessage' = if ( $Log = Get-Content - LiteralPath " $PackageDirectory \winuptp.log " - ErrorAction SilentlyContinue) { $Log } else { [ String ]::Empty }
44
+ ' LogMessage' = $LogMessage
35
45
' Runtime' = $installProcess.Info.Runtime
36
46
' ActionNeeded' = ' REBOOT'
37
47
}
You can’t perform that action at this time.
0 commit comments