Repository navigation
fix(ENG-15090): find default-installed launchers in credential-helper list - #491
Open
cloudsmith-iduffy wants to merge 2 commits into
Open
cloudsmith-iduffy wants to merge 2 commits into
cloudsmith-iduffy wants to merge 2 commits into
Conversation
… list `install` and `uninstall` default to `~/.cloudsmith/bin`, but each installer's `status()` called `resolve_bin_dir()`, which still looked beside the `cloudsmith` executable. `list` therefore reported a default install as not installed. `resolve_bin_dir()` now owns the `~/.cloudsmith/bin` default, so every caller uses the same directory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Default-path canonicalization must be preserved to prevent broken pnpm configuration after uninstalling existing symlinked installations.
1 open finding
What changed in this PR
Aligns credential-helper directory resolution so list finds default installations.
Changes:
- Centralizes the
~/.cloudsmith/bindefault in the shared resolver. - Removes redundant CLI resolution while preserving Terraform’s plugin-directory behavior.
- Adds regression coverage and a changelog entry.
| File | Description |
|---|---|
cloudsmith_cli/credential_helpers/launchers.py |
Centralizes the default launcher directory. |
cloudsmith_cli/cli/tests/commands/test_credential_helper_install.py |
Tests default resolution and install-to-list discovery. |
cloudsmith_cli/cli/commands/credential_helper/manage.py |
Passes directory overrides directly to installers. |
CHANGELOG.md |
Documents the discovery fix. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
1 of 6 tasks
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
After a default
cloudsmith credential-helper install docker(or pnpm, cargo),cloudsmith credential-helper listreports the helper as not installed.#482 made
installanduninstalldefault to~/.cloudsmith/bin, through a_resolve_bin_dir()helper inmanage.py. Each installer'sstatus(), whichlistcalls, still usedlaunchers.resolve_bin_dir(). That function looked beside thecloudsmithexecutable first, then in~/.local/bin(or%LOCALAPPDATA%\Cloudsmith\bin). Solistlooked in one directory andinstallwrote to another.This PR moves the
~/.cloudsmith/bindefault intoresolve_bin_dir()itself, andmanage.pypasses--bin-dirthrough again. Every caller now resolves the same directory. Terraform is unchanged, because its installer keeps its own plugin-directory resolution when--bin-diris not given. The old executable-directory and~/.local/binfallbacks were no longer reachable frominstall, so I removed them with_user_bin_dir.Type of Change
Additional Notes
A new regression test runs a default
install dockerand thenlist -F json, and checks thatlistreports the launcher in~/.cloudsmith/bin. It failed before the change.🤖 Generated with Claude Code