Skip to content

Commit

Permalink
Merge pull request #323 from thaJeztah/pass_simplify_get
Browse files Browse the repository at this point in the history
pass: Get: remove redundant stat
  • Loading branch information
thaJeztah authored May 10, 2024
2 parents dc10c50 + a14669f commit 6b9df3e
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions pass/pass.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,6 @@ func (p Pass) Get(serverURL string) (string, string, error) {
}

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)
if err != nil {
return "", "", err
Expand Down

0 comments on commit 6b9df3e

Please sign in to comment.