refactor: bubble up error handling so that standard exit codes can be set at the top-level
LogFail shouldn't be called internally if at all possible.
This commit is contained in:
1 parent
ccdbaa84f9
commit
d09a7506df
26 files changed
+113
-80
No files matched your search
@@ -72,7 +72,7 @@ func main() {
|
||||
}
|
||||
err = buildpacks.CommandSetProperty(appName, property, value)
|
||||
default:
|
||||
common.LogFail(fmt.Sprintf("Invalid plugin subcommand call: %s", subcommand))
|
||||
err = fmt.Errorf("Invalid plugin subcommand call: %s", subcommand)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -42,7 +42,7 @@ func main() {
|
||||
appName := flag.Arg(0)
|
||||
err = buildpacks.ReportSingleApp(appName, "", "")
|
||||
default:
|
||||
common.LogFail(fmt.Sprintf("Invalid plugin trigger call: %s", trigger))
|
||||
err = fmt.Errorf("Invalid plugin trigger call: %s", trigger)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user