refactor: surface errors when running reports

This commit is contained in:
Jose Diaz-Gonzalez committed 2020-02-22 06:40:24 -05:00
1 parent 59316f4a21
commit 26e8524ae5
10 files changed
+42 -33

No files matched your search

+4 -4
View File
@@ -7,14 +7,14 @@ import (
)
// ReportSingleApp is an internal function that displays the app report for one or more apps
func ReportSingleApp(appName, infoFlag string) {
func ReportSingleApp(appName, infoFlag string) error {
if err := common.VerifyAppName(appName); err != nil {
common.LogFail(err.Error())
return err
}
buildpacks, err := common.PropertyListGet("buildpacks", appName, "buildpacks")
if err != nil {
common.LogFail(err.Error())
return err
}
infoFlags := map[string]string{
@@ -23,5 +23,5 @@ func ReportSingleApp(appName, infoFlag string) {
trimPrefix := false
uppercaseFirstCharacter := true
common.ReportSingleApp("buildpacks", appName, infoFlag, infoFlags, trimPrefix, uppercaseFirstCharacter)
return common.ReportSingleApp("buildpacks", appName, infoFlag, infoFlags, trimPrefix, uppercaseFirstCharacter)
}