aboutsummaryrefslogtreecommitdiff
path: root/cmd/wmi.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/wmi.go')
-rw-r--r--cmd/wmi.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/cmd/wmi.go b/cmd/wmi.go
index 196ff82..a9563a8 100644
--- a/cmd/wmi.go
+++ b/cmd/wmi.go
@@ -149,12 +149,9 @@ References:
}
if outputPath != "" {
- if reader, err := wmiProc.GetOutput(ctx); err == nil {
- _, err = io.Copy(writer, reader)
-
- } else {
+ if err = wmiProc.IO.GetOutput(ctx); err != nil {
log.Error().Err(err).Msg("Failed to get process execution output")
- returnCode = 2
+ returnCode = 4
}
}
},