From c57bb42f207972e44e9c67fcf2f2bcbe88e24fa6 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 11 Jan 2025 08:14:45 -0600 Subject: os.Exec() is smarter now --- main.go | 11 ++++++++--- 1 file 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 { -- cgit v1.2.3