Merge pull request #291 from silverneko/bpmodify-exit
bpmodify: fix os.Exit() shouldn't shadow panic()
This commit is contained in:
commit
215230a3e8
1 changed files with 6 additions and 1 deletions
|
@ -223,7 +223,12 @@ func walkDir(path string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
defer func() { os.Exit(exitCode) }()
|
defer func() {
|
||||||
|
if err := recover(); err != nil {
|
||||||
|
report(fmt.Errorf("error: %s", err))
|
||||||
|
}
|
||||||
|
os.Exit(exitCode)
|
||||||
|
}()
|
||||||
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue