fix: ensure all report subcommands exit 0 when there is no app

Closes #7454
This commit is contained in:
Jose Diaz-Gonzalez committed 2025-02-02 01:37:20 -05:00
1 parent 8e88a3b54a
commit e1af6ad1f9
17 files changed
+128 -6

No files matched your search

+5
View File
@@ -2,6 +2,7 @@ package cron
import (
"encoding/json"
"errors"
"fmt"
"os"
@@ -55,6 +56,10 @@ func CommandReport(appName string, format string, infoFlag string) error {
if len(appName) == 0 {
apps, err := common.DokkuApps()
if err != nil {
if errors.Is(err, common.NoAppsExist) {
common.LogWarn(err.Error())
return nil
}
return err
}
for _, appName := range apps {