Skip to content

Commit 0d745e6

Browse files
Rodrigo NavarroRodrigo Navarro
authored andcommitted
master (fix): Get error from git command execution and set success or fail
1 parent 5cd59fb commit 0d745e6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/git/git.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@ func commit(cmdGit *exec.Cmd, message ...interface{}) {
3333
fmt.Println(color.Gray("-------------------------------"))
3434
fmt.Println("")
3535
cmdGit.Stdout = os.Stdout
36-
cmdGit.Run()
36+
err := cmdGit.Run()
3737
fmt.Println("")
3838
fmt.Println(color.Gray("-------------------------------"))
39-
fmt.Println(color.Green("Done \U0001F604"))
39+
if err == nil {
40+
fmt.Println(color.Green("Done \U0001F604"))
41+
} else {
42+
fmt.Println(color.Red("Something went grong \U0001F92F"))
43+
}
4044

4145
return
4246
}

0 commit comments

Comments
 (0)