Skip to content

Commit

Permalink
appease linter
Browse files Browse the repository at this point in the history
  • Loading branch information
petersutter committed Dec 9, 2021
1 parent 86b0a87 commit 284af9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func initConfig() {

viper.AddConfigPath(envHomeDir)
viper.AddConfigPath(configPath)

if os.Getenv(envConfigName) != "" {
viper.SetConfigName(os.Getenv(envConfigName))
} else {
Expand Down Expand Up @@ -128,6 +129,7 @@ func readInConfig() error {

return fmt.Errorf("failed to fallback to gardenctl-v2 config file: %w", err)
}

return origErr
}

Expand All @@ -153,6 +155,7 @@ func addGardenctlV2Config() {

viper.AddConfigPath(envHomeDir)
viper.AddConfigPath(configPath)

if os.Getenv(envConfigName) != "" {
viper.SetConfigName(os.Getenv(envConfigName))
} else {
Expand Down
1 change: 1 addition & 0 deletions internal/cmd/util/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func (c *Config) FindGarden(clusterIdentity string) (*Garden, error) {
for _, cluster := range gardenClusters {
if cluster.ClusterIdentity == clusterIdentity {
klog.Warningln("Your are using deprecated config properties for gardenlogin. Please update your config file as these properties will not be supported in future versions. \"gardenClusters\" was renamed to \"gardens\", \"clusterIdentity\" was renamed to \"identity\".\n")

return &Garden{
Identity: cluster.ClusterIdentity,
Kubeconfig: cluster.Kubeconfig,
Expand Down

0 comments on commit 284af9c

Please sign in to comment.