Skip to content

cli/config/credentials: skip unneeded exec.LookPath()#4262

Merged
thaJeztah merged 1 commit intodocker:masterfrom
thaJeztah:no_lookpath
May 16, 2023
Merged

cli/config/credentials: skip unneeded exec.LookPath()#4262
thaJeztah merged 1 commit intodocker:masterfrom
thaJeztah:no_lookpath

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

defaultCredentialsStore() on Linux does an exec.LookPath() for "pass", but if a custom credential-store is passed to DetectDefaultStore, the result of that won't be used.

This patch changes the logic to return early if a custom credential-store is passed.

- Description for the changelog

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

defaultCredentialsStore() on Linux does an exec.LookPath() for "pass", but
if a custom credential-store is passed to DetectDefaultStore, the result
of that won't be used.

This patch changes the logic to return early if a custom credential-store
is passed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added status/2-code-review kind/refactor PR's that refactor, or clean-up code labels May 5, 2023
@thaJeztah thaJeztah modified the milestones: 24.0.0, 25.0.0 May 5, 2023
@thaJeztah thaJeztah merged commit 761d973 into docker:master May 16, 2023
@thaJeztah thaJeztah deleted the no_lookpath branch May 16, 2023 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/refactor PR's that refactor, or clean-up code status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants