Skip to content

Commit 116f85c

Browse files
committed
fix(cli/auth): Don't prompt on known values when incomplete config is passed
Signed-off-by: spbsoluble <1661003+spbsoluble@users.noreply.github.com>
1 parent 58eaa8e commit 116f85c

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

cmd/root.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,13 @@ func initClient(saveConfig bool) (*api.Client, error) {
692692
}
693693

694694
conf, _ := getServerConfigFromFile(configFile, profile)
695-
iConfig, iErr := authInteractive(conf, profile, !noPrompt, false, configFile)
695+
iConfig, iErr := authInteractive(
696+
conf,
697+
profile,
698+
false,
699+
false,
700+
configFile,
701+
) // TODO: don't save config and don't prompt on already known values
696702
if iErr == nil {
697703
if profile == "" {
698704
profile = auth_providers.DefaultConfigProfile
@@ -800,7 +806,7 @@ func initGenClient(
800806
}
801807

802808
conf, _ := getServerConfigFromFile(configFile, profile)
803-
iConfig, iErr := authInteractive(conf, profile, !noPrompt, false, configFile)
809+
iConfig, iErr := authInteractive(conf, profile, false, false, configFile)
804810
if iErr == nil {
805811
if profile == "" {
806812
profile = auth_providers.DefaultConfigProfile

0 commit comments

Comments
 (0)