1
0

Move bootstrap before kernels check

This commit is contained in:
dump_stack() 2018-12-02 03:19:41 +00:00
parent b459f91a22
commit cf0e5efe18

18
main.go
View File

@ -123,6 +123,15 @@ func main() {
} }
} }
if !exists(usr.HomeDir + "/.out-of-tree") {
log.Println("First run, bootstrap...")
err = bootstrapHandler()
if err != nil {
log.Println("bootstrap error:", err)
}
return
}
kingpin.MustParse(app.Parse(os.Args[1:])) kingpin.MustParse(app.Parse(os.Args[1:]))
kcfg, err := config.ReadKernelConfig(*kcfgPath) kcfg, err := config.ReadKernelConfig(*kcfgPath)
@ -145,15 +154,6 @@ func main() {
handleFallbacks(kcfg) handleFallbacks(kcfg)
if !exists(usr.HomeDir + "/.out-of-tree") {
log.Println("First run, bootstrap...")
err = bootstrapHandler()
if err != nil {
log.Println("bootstrap error:", err)
}
return
}
switch kingpin.MustParse(app.Parse(os.Args[1:])) { switch kingpin.MustParse(app.Parse(os.Args[1:])) {
case pewCommand.FullCommand(): case pewCommand.FullCommand():
err = pewHandler(kcfg, *path, *pewKernel, *pewBinary, err = pewHandler(kcfg, *path, *pewKernel, *pewBinary,