Skip to content

Commit

Permalink
(feat): - Ensured warning information is logged with logrus WARN le…
Browse files Browse the repository at this point in the history
…vel.

Signed-off-by: Camila Macedo <[email protected]>
Signed-off-by: Camila Macedo <[email protected]>
  • Loading branch information
camilamacedo86 authored and Camila Macedo committed Sep 28, 2023
1 parent f991592 commit d0dddc2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion subcommands/targets/offline-update.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"fmt"
"github.com/foundriesio/fioctl/client"
"github.com/foundriesio/fioctl/subcommands"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"io"
Expand Down Expand Up @@ -89,7 +90,7 @@ func doOfflineUpdate(cmd *cobra.Command, args []string) {
fmt.Printf("Downloading Apps fetched by the `assemble-system-image` run; build number: %d, tag: %s...\n", ti.version, ti.buildTag)
err = downloadApps(factory, targetName, ti.version, ti.buildTag, path.Join(dstDir, "apps"))
if herr := client.AsHttpError(err); herr != nil && herr.Response.StatusCode == 404 {
fmt.Println("WARNING: The Target Apps were not fetched by the `assemble` run, make sure that App preloading is enabled if needed. The update won't include any Apps!")
logrus.Warning("WARNING: The Target Apps were not fetched by the `assemble` run, make sure that App preloading is enabled if needed. The update won't include any Apps!")
} else {
subcommands.DieNotNil(err, "Failed to download Target's Apps:")
}
Expand Down

0 comments on commit d0dddc2

Please sign in to comment.