Skip to content

Commit cc2b6de

Browse files
authored
Fix nsinsider log (#18647)
1 parent 938f0ba commit cc2b6de

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

components/ws-daemon/pkg/nsinsider/nsinsider.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,9 @@ func Nsinsider(instanceID string, targetPid int, mod func(*exec.Cmd), opts ...ns
107107
err = cmd.Run()
108108
log.FromBuffer(&cmdOut, log.WithFields(log.OWI("", "", instanceID)))
109109
if err != nil {
110-
out, oErr := cmd.CombinedOutput()
111-
if oErr != nil {
112-
return fmt.Errorf("run nsinsider (%v) \n%v\n output error: %v",
113-
cmd.Args,
114-
err,
115-
oErr,
116-
)
117-
}
118110
return fmt.Errorf("run nsinsider (%v) failed: %q\n%v",
119111
cmd.Args,
120-
string(out),
112+
cmdOut.String(),
121113
err,
122114
)
123115
}

0 commit comments

Comments
 (0)