@@ -17,11 +17,12 @@ func defaultAction(complete chan<- bool, dep Dep, perform Perform) {
17
17
fmt .Println ("Dry run of: `" , perform .Kind , strings .Join (mustachedActionParams , " " ), "` for: " , dep .Location )
18
18
} else {
19
19
fmt .Println ("Running: `" , perform .Kind , strings .Join (mustachedActionParams , " " ), "` for: " , dep .Location )
20
-
20
+ command := perform . Kind + " " + strings . Join ( mustachedActionParams , " " )
21
21
cmd := exec .Command (perform .Kind , mustachedActionParams ... )
22
22
cmd .Dir = dep .Location
23
23
//TODO: Find a way to "stream" output to terminal?
24
- checkOkay (cmd .CombinedOutput ()) //Combines errors to output
24
+ out , err := cmd .CombinedOutput ()
25
+ checkOkay (command , out , err ) //Combines errors to output
25
26
//out, err := cmd.Output() // just stdout
26
27
}
27
28
@@ -40,19 +41,22 @@ func dockerComposeAction(complete chan<- bool, perform Perform, action []string)
40
41
fmt .Println ("Dry run of: " )
41
42
fmt .Println (perform .Kind , action )
42
43
} else {
44
+ command := perform .Kind + " " + strings .Join (action , " " )
43
45
cmd := exec .Command (perform .Kind , action ... )
44
46
//TODO: Find a way to "stream" output to terminal?
45
- checkOkay (cmd .CombinedOutput ()) //Combines errors to output
47
+ out , err := cmd .CombinedOutput ()
48
+ checkOkay (command , out , err ) //Combines errors to output
46
49
}
47
50
48
51
complete <- true
49
52
}
50
53
51
54
/// *** Helpers *** ///
52
55
53
- func checkOkay (out []byte , err error ) {
56
+ func checkOkay (command string , out []byte , err error ) {
54
57
if err != nil {
55
58
fmt .Println ("Command finished with error: " , err )
59
+ fmt .Println (command )
56
60
}
57
61
58
62
if string (out ) == "" {
0 commit comments