fix: ensure we continue on with logic if the error returned from fetching all apps is NoAppsExist

This makes it so we don't accidentally skip logic that happens after iterate over the apps.
This commit is contained in:
Jose Diaz-Gonzalez
2025-12-05 20:16:15 -05:00
parent 4942a15a2b
commit 129691eb6e
8 changed files with 14 additions and 8 deletions

View File

@@ -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
}

View File

@@ -109,7 +109,7 @@ func TriggerInstall() error {
}
apps, err := common.UnfilteredDokkuApps()
if err != nil {
if err != nil && !errors.Is(err, common.NoAppsExist) {
return nil
}

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -100,7 +100,7 @@ func TriggerInstall() error {
}
apps, err := common.UnfilteredDokkuApps()
if err != nil {
if err != nil && !errors.Is(err, common.NoAppsExist) {
return nil
}

View File

@@ -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
}