Skip to content

pass: Get: remove redundant stat#323

Merged
thaJeztah merged 1 commit intodocker:masterfrom
thaJeztah:pass_simplify_get
May 10, 2024
Merged

pass: Get: remove redundant stat#323
thaJeztah merged 1 commit intodocker:masterfrom
thaJeztah:pass_simplify_get

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

listPassdir already handles "not found" errors, in which case it returns an empty result. Previously this would return a custom error, but since 1bb9aa3 (#321), an empty result produces a errCredentialsNotFound, making this check redundant.

This patch removes the redundant check.

- A picture of a cute animal (not mandatory but encouraged)

listPassdir already handles "not found" errors, in which case it returns
an [empty result][1]. Previously this would return a custom error, but
since 1bb9aa3, an empty result produces
a `errCredentialsNotFound`, making this check redundant.

This patch removes the redundant check.

[1]: https://github.com/docker/docker-credential-helpers/blob/f64d6b131b3da07a6337dc63a882e08ce541d1c1/pass/pass.go#L118-L125

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah self-assigned this May 10, 2024
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.28%. Comparing base (74840b3) to head (a14669f).
Report is 24 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #323      +/-   ##
==========================================
+ Coverage   54.93%   55.28%   +0.35%     
==========================================
  Files           9        9              
  Lines         628      624       -4     
==========================================
  Hits          345      345              
+ Misses        237      234       -3     
+ Partials       46       45       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants