Skip to content

Commit

Permalink
Web UI with arguments give error
Browse files Browse the repository at this point in the history
  • Loading branch information
josephburnett committed Apr 2, 2024
1 parent 0a1ac0a commit 8e742b1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ func main() {
return
}
if *port != 0 {
if len(flag.Args()) > 0 {
errorAndExit("The web UI (-port) does not support arguments")
}
err := serveWeb(strconv.Itoa(*port))
if err != nil {
fmt.Println(err.Error())
errorAndExit(err.Error())
}
return
}
Expand All @@ -53,7 +56,7 @@ func main() {
if *gitDiffDriver {
err := printGitDiffDriver(metadata)
if err != nil {
panic(err)
errorAndExit(err.Error())
}
os.Exit(0)
return
Expand Down

0 comments on commit 8e742b1

Please sign in to comment.