Repository navigation
feat(ENG-15090): creating default credential helper dir in user's home directory - #482
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The default breaks Terraform installation and leaves default-installed launchers behind during uninstall.
3 open findings
What changed in this PR
Adds a consistent credential-helper installation path and PATH guidance.
Changes:
- Defaults installations to
~/.cloudsmith/bin. - Centralizes Docker and Cargo PATH warnings with an export hint.
- Removes redundant test returns.
| File | Description |
|---|---|
cloudsmith_cli/credential_helpers/docker/installer.py |
Uses the shared PATH warning. |
cloudsmith_cli/credential_helpers/common.py |
Adds PATH warning generation. |
cloudsmith_cli/credential_helpers/cargo/installer.py |
Uses the shared PATH warning. |
cloudsmith_cli/cli/tests/test_org_option.py |
Removes a redundant return. |
cloudsmith_cli/cli/tests/test_decorators.py |
Removes redundant returns. |
cloudsmith_cli/cli/commands/credential_helper/manage.py |
Adds the default installation directory. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Revision history
Generated by jj-stack from this pull request's force-push history. |
711c9a0 to
71fb895
Compare
…e directory
If an install directory is not specified in the install command, the installer will fall back to the directory the CLI is installed in via which.
This causes issues when the CLI is installed via a package manager (brew, apt, nix), as credential helpers will be overwritten on package upgrade, or inaccessible in read-only packaging distributions.
- Adding default install path for credential helper at `~/.cloudsmith/bin/`
- Cloudsmith managed credential helpers should not interfere with directories managed by package managers.
- Default path for cloudsmith credential helpers means all cloudsmith related configs and software are under the same `.cloudsmith` directory.
- Adding hint to warning message to add install dir to path
- Adding a generic hint to add the credential helper to the path.
- Random lints via `ruff check --fix`
71fb895 to
918d086
Compare
| @click.option( | ||
| "--bin-dir", default=None, help="Directory to install the launcher binary." | ||
| "--bin-dir", | ||
| default=None, |
There was a problem hiding this comment.
Why not set the default here rather than on line 58?
cloudsmith-iduffy
left a comment
There was a problem hiding this comment.
Small question on default placement but otherwise fine.
Usage for terraform is a little confusing but I don't see another way - maybe help text of terraform installer will ignore this option but its not useful to see that every time.
…-hint-on-credential-helper-install-rtlqvvxz


If an install directory is not specified in the install command, the installer will fall back to the directory the CLI is installed in via which. This causes issues when the CLI is installed via a package manager (brew, apt, nix), as credential helpers will be overwritten on package upgrade, or inaccessible in read-only packaging distributions.
~/.cloudsmith/bin/.cloudsmithdirectory.ruff check --fix