diff --git a/plugins/apps/triggers.go b/plugins/apps/triggers.go index ad16adb10..32bfbd515 100644 --- a/plugins/apps/triggers.go +++ b/plugins/apps/triggers.go @@ -1,6 +1,7 @@ package apps import ( + "errors" "fmt" "os" "time" @@ -48,7 +49,7 @@ func TriggerInstall() error { } apps, err := common.UnfilteredDokkuApps() - if err != nil { + if err != nil && !errors.Is(err, common.NoAppsExist) { return nil } diff --git a/plugins/builder/triggers.go b/plugins/builder/triggers.go index dfbd57683..a47c48a78 100644 --- a/plugins/builder/triggers.go +++ b/plugins/builder/triggers.go @@ -109,7 +109,7 @@ func TriggerInstall() error { } apps, err := common.UnfilteredDokkuApps() - if err != nil { + if err != nil && !errors.Is(err, common.NoAppsExist) { return nil } diff --git a/plugins/common/data.go b/plugins/common/data.go index a3c1e8092..075ae06d5 100644 --- a/plugins/common/data.go +++ b/plugins/common/data.go @@ -1,6 +1,7 @@ package common import ( + "errors" "fmt" "os" "path/filepath" @@ -78,7 +79,7 @@ func SetupAppData(pluginName string) error { } apps, err := UnfilteredDokkuApps() - if err != nil { + if err != nil && !errors.Is(err, NoAppsExist) { return nil } diff --git a/plugins/common/triggers.go b/plugins/common/triggers.go index 2c10767da..dd5ae5c5c 100644 --- a/plugins/common/triggers.go +++ b/plugins/common/triggers.go @@ -1,6 +1,7 @@ package common import ( + "errors" "fmt" ) @@ -34,7 +35,7 @@ func TriggerInstall() error { } apps, err := UnfilteredDokkuApps() - if err != nil { + if err != nil && !errors.Is(err, NoAppsExist) { return nil } diff --git a/plugins/network/triggers.go b/plugins/network/triggers.go index 370ffd68f..c6035310b 100644 --- a/plugins/network/triggers.go +++ b/plugins/network/triggers.go @@ -1,6 +1,7 @@ package network import ( + "errors" "fmt" "io" "os" @@ -37,7 +38,7 @@ func TriggerInstall() error { } apps, err := common.UnfilteredDokkuApps() - if err != nil { + if err != nil && !errors.Is(err, common.NoAppsExist) { return nil } diff --git a/plugins/ports/triggers.go b/plugins/ports/triggers.go index bb4e7a83d..c8c4288a0 100644 --- a/plugins/ports/triggers.go +++ b/plugins/ports/triggers.go @@ -2,6 +2,7 @@ package ports import ( "encoding/json" + "errors" "fmt" "sort" @@ -16,7 +17,7 @@ func TriggerInstall() error { } apps, err := common.UnfilteredDokkuApps() - if err != nil { + if err != nil && !errors.Is(err, common.NoAppsExist) { return nil } diff --git a/plugins/ps/triggers.go b/plugins/ps/triggers.go index aa2282460..22471053d 100644 --- a/plugins/ps/triggers.go +++ b/plugins/ps/triggers.go @@ -100,7 +100,7 @@ func TriggerInstall() error { } apps, err := common.UnfilteredDokkuApps() - if err != nil { + if err != nil && !errors.Is(err, common.NoAppsExist) { return nil } diff --git a/plugins/scheduler/triggers.go b/plugins/scheduler/triggers.go index a83ce8013..a7f38ec5f 100644 --- a/plugins/scheduler/triggers.go +++ b/plugins/scheduler/triggers.go @@ -1,6 +1,7 @@ package scheduler import ( + "errors" "fmt" "github.com/dokku/dokku/plugins/common" @@ -31,7 +32,7 @@ func TriggerInstall() error { } apps, err := common.UnfilteredDokkuApps() - if err != nil { + if err != nil && !errors.Is(err, common.NoAppsExist) { return nil }