mirror of
https://github.com/passbolt/go-passbolt-cli.git
synced 2025-05-12 02:58:20 +00:00
fix windows build failing due to syscall
This commit is contained in:
parent
e5c267da42
commit
fe7e6b2a22
1 changed files with 2 additions and 4 deletions
|
@ -9,7 +9,6 @@ import (
|
|||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/passbolt/go-passbolt/api"
|
||||
"github.com/passbolt/go-passbolt/helper"
|
||||
|
@ -19,12 +18,11 @@ import (
|
|||
|
||||
// ReadPassword reads a Password interactively or via Pipe
|
||||
func ReadPassword() (string, error) {
|
||||
var fd int
|
||||
fd := int(os.Stdin.Fd())
|
||||
var pass []byte
|
||||
if term.IsTerminal(syscall.Stdin) {
|
||||
if term.IsTerminal(fd) {
|
||||
fmt.Print("Enter Password:")
|
||||
|
||||
fd = syscall.Stdin
|
||||
inputPass, err := term.ReadPassword(fd)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
|
Loading…
Add table
Reference in a new issue