File tree 1 file changed +6
-8
lines changed
1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -9,16 +9,14 @@ import (
9
9
"crypto/x509"
10
10
"errors"
11
11
"fmt"
12
- "net/url"
13
- "os"
14
- "path/filepath"
15
- "strings"
16
- "syscall"
17
-
18
12
"github.com/fatih/color"
19
13
"github.com/spf13/cobra"
20
14
"github.com/spf13/viper"
21
15
"golang.org/x/term"
16
+ "net/url"
17
+ "os"
18
+ "path/filepath"
19
+ "strings"
22
20
)
23
21
24
22
// newConfigureCmd represents the configure command
@@ -177,8 +175,8 @@ func saveConfiguration(cmd *cobra.Command) error {
177
175
178
176
if rootConfig .Token == "" || overwrite {
179
177
fmt .Println ("Please enter the APISIX token: " )
180
- if term .IsTerminal (syscall .Stdin ) {
181
- token , err := term .ReadPassword (syscall .Stdin )
178
+ if term .IsTerminal (int ( os .Stdin . Fd ()) ) {
179
+ token , err := term .ReadPassword (int ( os .Stdin . Fd ()) )
182
180
if err != nil {
183
181
return err
184
182
}
You can’t perform that action at this time.
0 commit comments