From b4f3741ac707ba90ab7a3a20444172f297bf9ee3 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 8 Mar 2025 23:49:11 -0500 Subject: [PATCH] fix: properly handle NoAppsExist in network:rebuild-all and buildpacks:set Refs #6815 --- plugins/buildpacks/subcommands.go | 2 +- plugins/network/subcommands.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/buildpacks/subcommands.go b/plugins/buildpacks/subcommands.go index 7a2a13d08..329ed6b9f 100644 --- a/plugins/buildpacks/subcommands.go +++ b/plugins/buildpacks/subcommands.go @@ -162,7 +162,7 @@ func CommandSetProperty(appName string, property string, value string) error { } apps, err := common.DokkuApps() - if err != nil { + if err != nil && !errors.Is(err, common.NoAppsExist) { return err } for _, app := range apps { diff --git a/plugins/network/subcommands.go b/plugins/network/subcommands.go index 891a4e461..ea9fbfacf 100644 --- a/plugins/network/subcommands.go +++ b/plugins/network/subcommands.go @@ -145,6 +145,10 @@ func CommandList(format string) error { func CommandRebuildall() error { apps, err := common.DokkuApps() if err != nil { + if errors.Is(err, common.NoAppsExist) { + common.LogWarn(err.Error()) + return nil + } return err }