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:
8 files changed
+14
-8
No files matched your search
@@ -1,6 +1,7 @@
|
|||||||
package apps
|
package apps
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
@@ -48,7 +49,7 @@ func TriggerInstall() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apps, err := common.UnfilteredDokkuApps()
|
apps, err := common.UnfilteredDokkuApps()
|
||||||
if err != nil {
|
if err != nil && !errors.Is(err, common.NoAppsExist) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ func TriggerInstall() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apps, err := common.UnfilteredDokkuApps()
|
apps, err := common.UnfilteredDokkuApps()
|
||||||
if err != nil {
|
if err != nil && !errors.Is(err, common.NoAppsExist) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package common
|
package common
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@@ -78,7 +79,7 @@ func SetupAppData(pluginName string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apps, err := UnfilteredDokkuApps()
|
apps, err := UnfilteredDokkuApps()
|
||||||
if err != nil {
|
if err != nil && !errors.Is(err, NoAppsExist) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package common
|
package common
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -34,7 +35,7 @@ func TriggerInstall() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apps, err := UnfilteredDokkuApps()
|
apps, err := UnfilteredDokkuApps()
|
||||||
if err != nil {
|
if err != nil && !errors.Is(err, NoAppsExist) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package network
|
package network
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
@@ -37,7 +38,7 @@ func TriggerInstall() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apps, err := common.UnfilteredDokkuApps()
|
apps, err := common.UnfilteredDokkuApps()
|
||||||
if err != nil {
|
if err != nil && !errors.Is(err, common.NoAppsExist) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package ports
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
@@ -16,7 +17,7 @@ func TriggerInstall() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apps, err := common.UnfilteredDokkuApps()
|
apps, err := common.UnfilteredDokkuApps()
|
||||||
if err != nil {
|
if err != nil && !errors.Is(err, common.NoAppsExist) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ func TriggerInstall() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apps, err := common.UnfilteredDokkuApps()
|
apps, err := common.UnfilteredDokkuApps()
|
||||||
if err != nil {
|
if err != nil && !errors.Is(err, common.NoAppsExist) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package scheduler
|
package scheduler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/dokku/dokku/plugins/common"
|
"github.com/dokku/dokku/plugins/common"
|
||||||
@@ -31,7 +32,7 @@ func TriggerInstall() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apps, err := common.UnfilteredDokkuApps()
|
apps, err := common.UnfilteredDokkuApps()
|
||||||
if err != nil {
|
if err != nil && !errors.Is(err, common.NoAppsExist) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user