We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9bd12bc + 7c68fec commit ffd5728Copy full SHA for ffd5728
1 file changed
auth.go
@@ -2,7 +2,9 @@ package main
2
3
import (
4
"errors"
5
+ "io/ioutil"
6
"net/url"
7
+ "os"
8
"strings"
9
10
"github.com/reconquest/karma-go"
@@ -47,6 +49,17 @@ func GetCredentials(
47
49
}
48
50
51
52
+ if password == "-" {
53
+ b, err := ioutil.ReadAll(os.Stdin)
54
+ if err != nil {
55
+ return nil, karma.Format(
56
+ err,
57
+ "unable to read password from stdin",
58
+ )
59
+ }
60
+ password = string(b)
61
62
+
63
url, err := url.Parse(targetURL)
64
if err != nil {
65
return nil, karma.Format(
0 commit comments