mirror of
https://github.com/docker/docker-credential-helpers.git
synced 2026-06-15 08:52:10 +05:30
Merge pull request #323 from thaJeztah/pass_simplify_get
pass: Get: remove redundant stat
This commit is contained in:
@@ -142,15 +142,6 @@ func (p Pass) Get(serverURL string) (string, string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
encoded := encodeServerURL(serverURL)
|
encoded := encodeServerURL(serverURL)
|
||||||
|
|
||||||
if _, err := os.Stat(path.Join(getPassDir(), PASS_FOLDER, encoded)); err != nil {
|
|
||||||
if os.IsNotExist(err) {
|
|
||||||
return "", "", credentials.NewErrCredentialsNotFound()
|
|
||||||
}
|
|
||||||
|
|
||||||
return "", "", err
|
|
||||||
}
|
|
||||||
|
|
||||||
usernames, err := listPassDir(encoded)
|
usernames, err := listPassDir(encoded)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", "", err
|
return "", "", err
|
||||||
|
|||||||
Reference in New Issue
Block a user