Do not die inside handler, just return error
This commit is contained in:
parent
29c12f18ce
commit
672a8e6735
6
main.go
6
main.go
@ -408,7 +408,7 @@ func exists(path string) bool {
|
|||||||
func pewHandler(workPath, kcfgPath string) (err error) {
|
func pewHandler(workPath, kcfgPath string) (err error) {
|
||||||
ka, err := readArtifactConfig(workPath + "/.out-of-tree.toml")
|
ka, err := readArtifactConfig(workPath + "/.out-of-tree.toml")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalln(err)
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if ka.SourcePath == "" {
|
if ka.SourcePath == "" {
|
||||||
@ -417,12 +417,12 @@ func pewHandler(workPath, kcfgPath string) (err error) {
|
|||||||
|
|
||||||
kcfg, err := readKernelConfig(kcfgPath)
|
kcfg, err := readKernelConfig(kcfgPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalln(err)
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
err = performCI(ka, kcfg)
|
err = performCI(ka, kcfg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalln(err)
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user