fix(cmd/influx): don't print token, print the file where it stored

pull/10616/head
Kelvin Wang 2019-01-08 15:58:31 -05:00
parent fef6d4618e
commit 8a5da95f4d
1 changed files with 2 additions and 4 deletions

View File

@ -11,7 +11,7 @@ import (
"github.com/influxdata/platform/cmd/influx/internal" "github.com/influxdata/platform/cmd/influx/internal"
"github.com/influxdata/platform/http" "github.com/influxdata/platform/http"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/tcnksm/go-input" input "github.com/tcnksm/go-input"
) )
// setup Command // setup Command
@ -55,19 +55,17 @@ func setupF(cmd *cobra.Command, args []string) {
"Username", "Username",
"Organization", "Organization",
"Bucket", "Bucket",
"Token",
) )
w.Write(map[string]interface{}{ w.Write(map[string]interface{}{
"UserID": result.User.ID.String(), "UserID": result.User.ID.String(),
"Username": result.User.Name, "Username": result.User.Name,
"Organization": result.Org.Name, "Organization": result.Org.Name,
"Bucket": result.Bucket.Name, "Bucket": result.Bucket.Name,
"Token": result.Auth.Token,
}) })
writeTokenToPath(result.Auth.Token, defaultTokenPath()) writeTokenToPath(result.Auth.Token, defaultTokenPath())
w.Flush() w.Flush()
fmt.Println(promptWithColor("Your token has been stored in "+defaultTokenPath(), colorCyan))
} }
func getOnboardingRequest() (req *platform.OnboardingRequest) { func getOnboardingRequest() (req *platform.OnboardingRequest) {