File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,11 @@ func (o *GlobalOptions) GetPass() string {
82
82
cmd .Stderr = buf
83
83
if err := cmd .Run (); err == nil {
84
84
passwd = strings .TrimSpace (buf .String ())
85
+ } else {
86
+ panic (err )
85
87
}
88
+ } else {
89
+ log .Warning ("Pass binary was not found! Fallback to default password behaviour!" )
86
90
}
87
91
} else if o .PasswordSource .Value == "stdin" {
88
92
allBytes , err := ioutil .ReadAll (os .Stdin )
@@ -188,6 +192,8 @@ func (o *GlobalOptions) SetPass(passwd string) error {
188
192
return fmt .Errorf ("Failed to clear password for %s" , passName )
189
193
}
190
194
}
195
+ } else {
196
+ return fmt .Errorf ("Pass binary not found!" )
191
197
}
192
198
} else if o .PasswordSource .Value != "" {
193
199
return fmt .Errorf ("Unknown password-source: %s" , o .PasswordSource )
You can’t perform that action at this time.
0 commit comments