fix: error out if the appname or app.json is missing when retrieving cron entries

This commit is contained in:
Jose Diaz-Gonzalez
2025-11-07 22:17:13 -05:00
parent 5614a4c702
commit c52e947df1

View File

@@ -79,6 +79,10 @@ func FetchCronEntries(input FetchCronEntriesInput) ([]TemplateCommand, error) {
commands := []TemplateCommand{}
isMaintenance := reportComputedMaintenance(appName) == "true"
if input.AppJSON == nil && input.AppName == "" {
return commands, fmt.Errorf("Missing app name or app.json")
}
if input.AppJSON == nil {
appJSON, err := appjson.GetAppJSON(appName)
if err != nil {