@@ -11,7 +11,7 @@ import (
11
11
"time"
12
12
)
13
13
14
- const release = "0.0.2 "
14
+ const release = "0.0.3 "
15
15
16
16
var wipBranch = "mob-session" // override with MOB_WIP_BRANCH environment variable
17
17
var baseBranch = "master" // override with MOB_BASE_BRANCH environment variable
@@ -123,7 +123,7 @@ func startTimer(timerInMinutes string) {
123
123
err := command .Start ()
124
124
if err != nil {
125
125
sayError ("timer couldn't be started... (timer only works on OSX)" )
126
- sayError (err )
126
+ sayError (err . Error () )
127
127
} else {
128
128
timeOfTimeout := time .Now ().Add (time .Minute * time .Duration (timeoutInMinutes )).Format ("15:04" )
129
129
sayOkay (timerInMinutes + " minutes timer started (finishes at approx. " + timeOfTimeout + ")" )
@@ -205,7 +205,7 @@ func startZoomScreenshare() {
205
205
err := command .Start ()
206
206
if err != nil {
207
207
sayError ("screenshare couldn't be started... (screenshare only works on OSX or Linux with xdotool installed)" )
208
- sayError (err )
208
+ sayError (err . Error () )
209
209
} else {
210
210
if runtime .GOOS == "linux" {
211
211
sayOkay ("Sharing screen with zoom (requires the global shortcut ALT+S)" )
@@ -411,11 +411,12 @@ func git(args ...string) string {
411
411
fmt .Println (output )
412
412
}
413
413
if err != nil {
414
- sayError (command .Args )
415
- sayError (err )
414
+ sayError ("[" + strings .Join (command .Args , " " ) + "]" )
415
+ sayError (output )
416
+ sayError (err .Error ())
416
417
os .Exit (1 )
417
418
} else {
418
- sayOkay (command .Args )
419
+ sayOkay ("[" + strings . Join ( command .Args , " " ) + "]" )
419
420
}
420
421
return output
421
422
}
@@ -424,25 +425,28 @@ func say(s string) {
424
425
fmt .Println (s )
425
426
}
426
427
427
- func sayError (s interface {}) {
428
- fmt .Print (" ⚡ " )
429
- fmt .Print (s )
430
- fmt .Print ("\n " )
428
+ func sayError (s string ) {
429
+ lines := strings .Split (s , "\n " )
430
+ for i := 0 ; i < len (lines ); i ++ {
431
+ fmt .Print (" ERROR " )
432
+ fmt .Print (lines [i ])
433
+ fmt .Print ("\n " )
434
+ }
431
435
}
432
436
433
- func sayOkay (s interface {} ) {
437
+ func sayOkay (s string ) {
434
438
fmt .Print (" ✓ " )
435
439
fmt .Print (s )
436
440
fmt .Print ("\n " )
437
441
}
438
442
439
- func sayNote (s interface {} ) {
443
+ func sayNote (s string ) {
440
444
fmt .Print (" ❗ " )
441
445
fmt .Print (s )
442
446
fmt .Print ("\n " )
443
447
}
444
448
445
- func sayTodo (s interface {} ) {
449
+ func sayTodo (s string ) {
446
450
fmt .Print (" ☐ " )
447
451
fmt .Print (s )
448
452
fmt .Print ("\n " )
0 commit comments