Skip to content

Commit f7a6f29

Browse files
committed
don't panic, just print error
1 parent 8e484bd commit f7a6f29

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cmd/root.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import (
44
"fmt"
55
"os"
66

7-
"github.com/spf13/cobra"
8-
"strings"
97
"github-flow-manager/flow-manager"
108
"github.com/olekukonko/tablewriter"
9+
"github.com/spf13/cobra"
10+
"strings"
1111
"time"
1212
)
1313

@@ -52,7 +52,9 @@ Example use case "push all commits pushed to branch develop more than 30 minutes
5252

5353
results, err := flow_manager.Manage(*githubToken, owner, repo, sourceBranch, destinationBrnach, expression, *commitsNumber, *force, *dryRun)
5454
if nil != err {
55-
panic(err.Error())
55+
fmt.Println(err.Error())
56+
os.Exit(1)
57+
return
5658
}
5759

5860
if !*verbose {

0 commit comments

Comments
 (0)