Skip to content

Commit ecceca3

Browse files
authored
feat: optimize exit to 0 from 1 (#770)
1 parent a7f0c94 commit ecceca3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

config/application.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func NewApplication(envPath string) *Application {
2929

3030
if err := app.vip.ReadInConfig(); err != nil {
3131
color.Errorln("Invalid Config error: " + err.Error())
32-
os.Exit(1)
32+
os.Exit(0)
3333
}
3434
}
3535

@@ -39,13 +39,13 @@ func NewApplication(envPath string) *Application {
3939
color.Errorln("Please initialize APP_KEY first.")
4040
color.Default().Println("Create a .env file and run command: go run . artisan key:generate")
4141
color.Default().Println("Or set a system variable: APP_KEY={32-bit number} go run .")
42-
os.Exit(1)
42+
os.Exit(0)
4343
}
4444

4545
if len(appKey.(string)) != 32 {
4646
color.Errorln("Invalid APP_KEY, the length must be 32, please reset it.")
4747
color.Warningln("Example command: \ngo run . artisan key:generate")
48-
os.Exit(1)
48+
os.Exit(0)
4949
}
5050
}
5151

0 commit comments

Comments
 (0)