We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f014e77 commit 978c2c6Copy full SHA for 978c2c6
internal/executor/instance/persistentworker/isolation/tart/hook.go
@@ -1,8 +1,10 @@
1
package tart
2
3
import (
4
+ "bytes"
5
"context"
6
"fmt"
7
+
8
"github.com/cirruslabs/cirrus-cli/internal/executor/instance/persistentworker/remoteagent"
9
"github.com/cirruslabs/echelon"
10
"golang.org/x/crypto/ssh"
@@ -51,9 +53,15 @@ func unmountWorkingDirectoryHook(logger *echelon.Logger) remoteagent.WaitForAgen
51
53
return err
52
54
}
55
56
+ var stdout, stderr bytes.Buffer
57
+ sshSess.Stdout = &stdout
58
+ sshSess.Stderr = &stderr
59
60
if err := sshSess.Run(command); err != nil {
61
_ = sshSess.Close()
62
63
+ syncLogger.Errorf("%s", firstNonEmptyLine(stderr.String(), stdout.String()))
64
65
syncLogger.Finish(false)
66
67
0 commit comments