Skip to content

Commit

Permalink
revert code to test CI issue
Browse files Browse the repository at this point in the history
Signed-off-by: Navendu Pottekkat <[email protected]>
  • Loading branch information
pottekkat committed Oct 24, 2023
1 parent 4755f18 commit 5e5c65f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ import (
"os"
"path/filepath"
"strings"
"syscall"

"github.com/fatih/color"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"golang.org/x/term"
)

// newConfigureCmd represents the configure command
Expand Down Expand Up @@ -177,11 +175,11 @@ func saveConfiguration(cmd *cobra.Command) error {

if rootConfig.Token == "" || overwrite {
fmt.Println("Please enter the APISIX token: ")
byteToken, err := term.ReadPassword(syscall.Stdin)
token, err := reader.ReadString('\n')
if err != nil {
return err
}
rootConfig.Token = strings.TrimSpace(string(byteToken))
rootConfig.Token = strings.TrimSpace(string(token))
}

// use viper to save the configuration
Expand Down

0 comments on commit 5e5c65f

Please sign in to comment.