Skip to content

Commit

Permalink
fix: return properly on git repo check (#1613)
Browse files Browse the repository at this point in the history
  • Loading branch information
echoboomer authored Jun 13, 2023
1 parent 23fa814 commit 59600c3
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
5 changes: 4 additions & 1 deletion cmd/aws/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,10 @@ func createAws(cmd *cobra.Command, args []string) error {
Repositories: newRepositoryNames,
Teams: newTeamNames,
}
gitShim.InitializeGitProvider(&initGitParameters)
err = gitShim.InitializeGitProvider(&initGitParameters)
if err != nil {
return err
}

viper.Set(fmt.Sprintf("kubefirst-checks.%s-credentials", config.GitProvider), true)
viper.WriteConfig()
Expand Down
5 changes: 4 additions & 1 deletion cmd/civo/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,10 @@ func createCivo(cmd *cobra.Command, args []string) error {
Repositories: newRepositoryNames,
Teams: newTeamNames,
}
gitShim.InitializeGitProvider(&initGitParameters)
err = gitShim.InitializeGitProvider(&initGitParameters)
if err != nil {
return err
}

viper.Set(fmt.Sprintf("kubefirst-checks.%s-credentials", config.GitProvider), true)
viper.WriteConfig()
Expand Down
5 changes: 4 additions & 1 deletion cmd/digitalocean/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,10 @@ func createDigitalocean(cmd *cobra.Command, args []string) error {
Repositories: newRepositoryNames,
Teams: newTeamNames,
}
gitShim.InitializeGitProvider(&initGitParameters)
err = gitShim.InitializeGitProvider(&initGitParameters)
if err != nil {
return err
}

viper.Set(fmt.Sprintf("kubefirst-checks.%s-credentials", config.GitProvider), true)
viper.WriteConfig()
Expand Down
5 changes: 4 additions & 1 deletion cmd/gcp/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,10 @@ func createGCP(cmd *cobra.Command, args []string) error {
Repositories: newRepositoryNames,
Teams: newTeamNames,
}
gitShim.InitializeGitProvider(&initGitParameters)
err = gitShim.InitializeGitProvider(&initGitParameters)
if err != nil {
return err
}

viper.Set(fmt.Sprintf("kubefirst-checks.%s-credentials", config.GitProvider), true)
viper.WriteConfig()
Expand Down
5 changes: 4 additions & 1 deletion cmd/k3d/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,10 @@ func runK3d(cmd *cobra.Command, args []string) error {
Repositories: newRepositoryNames,
Teams: newTeamNames,
}
gitShim.InitializeGitProvider(&initGitParameters)
err = gitShim.InitializeGitProvider(&initGitParameters)
if err != nil {
return err
}

viper.Set(fmt.Sprintf("kubefirst-checks.%s-credentials", config.GitProvider), true)
viper.WriteConfig()
Expand Down
5 changes: 4 additions & 1 deletion cmd/vultr/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,10 @@ func createVultr(cmd *cobra.Command, args []string) error {
Repositories: newRepositoryNames,
Teams: newTeamNames,
}
gitShim.InitializeGitProvider(&initGitParameters)
err = gitShim.InitializeGitProvider(&initGitParameters)
if err != nil {
return err
}

viper.Set(fmt.Sprintf("kubefirst-checks.%s-credentials", config.GitProvider), true)
viper.WriteConfig()
Expand Down

0 comments on commit 59600c3

Please sign in to comment.