Skip to content

Commit

Permalink
chore: update logic
Browse files Browse the repository at this point in the history
Signed-off-by: João Vanzuita <joao@kubeshop.io>
  • Loading branch information
João Vanzuita committed Aug 17, 2022
1 parent d87a942 commit a4e710b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/k1-state.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/kubefirst/kubefirst/internal/aws"
"github.com/kubefirst/kubefirst/internal/reports"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"log"
"os"
)
Expand Down Expand Up @@ -59,6 +60,14 @@ var k1state = &cobra.Command{
}

if pull {

// at this point user doesn't have kubefirst config file and no aws.region
viper.Set("aws.region", region)
if err := viper.WriteConfig(); err != nil {
log.Println(err)
return
}

err := aws.DownloadS3File(bucketName, config.KubefirstConfigFileName)
if err != nil {
fmt.Println(err)
Expand Down

0 comments on commit a4e710b

Please sign in to comment.