summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-11 08:14:45 -0600
committerJeff Carr <[email protected]>2025-01-11 08:14:45 -0600
commitc57bb42f207972e44e9c67fcf2f2bcbe88e24fa6 (patch)
tree716bcc6f4e0c1bef62534bfbddbf14050bd5c48b
parent4546d067dd47c5af0ba0ad3defa4b9511047dce8 (diff)
os.Exec() is smarter now
-rw-r--r--main.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/main.go b/main.go
index bd3d743..af2240b 100644
--- a/main.go
+++ b/main.go
@@ -76,9 +76,14 @@ func main() {
log.Info("")
okExit("")
}
- shell.Exec([]string{"git", "diff"})
- shell.Exec([]string{"git", "commit", "--all"})
- okExit("forge done")
+ if err := shell.Exec([]string{"git", "diff"}); err != nil {
+ badExit(err)
+ }
+ if err := shell.ExecCheck([]string{"git", "commit", "--all"}); err != nil {
+ badExit(err)
+ }
+ log.Info("git commit ok. forge done")
+ okExit("")
}
if argv.Checkout != nil {