Skip to content

feat(ENG-15090): creating default credential helper dir in user's home directory - #482

Open
coillteoir wants to merge 2 commits into
masterfrom
jj-stack/feat-eng-15090-adding-path-export-hint-on-credential-helper-install-rtlqvvxz
Open

coillteoir wants to merge 2 commits into
masterfrom
jj-stack/feat-eng-15090-adding-path-export-hint-on-credential-helper-install-rtlqvvxz

Conversation

@coillteoir

@coillteoir coillteoir commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

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

@coillteoir
coillteoir requested a review from a team as a code owner October 14, 2026 09:11
Copilot AI balanced review requested due to automatic review settings October 14, 2026 09:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread cloudsmith_cli/credential_helpers/common.py
Comment thread cloudsmith_cli/cli/commands/credential_helper/manage.py Outdated
Comment thread cloudsmith_cli/credential_helpers/common.py Outdated
@coillteoir

coillteoir commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

Version Changes from previous version Submitted commit
8 (current) 71fb8954..918d086d 918d086d
7 711c9a0d..71fb8954 71fb8954
6 2fa9b431..711c9a0d 711c9a0d
5 65e0ea9c..2fa9b431 2fa9b431
4 4f1f1db9..65e0ea9c 65e0ea9c
3 6a00dbc0..4f1f1db9 4f1f1db9
2 56497e9d..6a00dbc0 6a00dbc0
1 Initial version 56497e9d

Generated by jj-stack from this pull request's force-push history.

@coillteoir
coillteoir force-pushed the jj-stack/feat-eng-15090-adding-path-export-hint-on-credential-helper-install-rtlqvvxz branch 6 times, most recently from 711c9a0 to 71fb895 Compare October 14, 2026 15:22
…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`
@coillteoir coillteoir changed the title feat(ENG-15090): adding path export hint on credential helper install feat(ENG-15090): creating default credential helper dir in user's home directory Oct 14, 2026
@coillteoir
coillteoir force-pushed the jj-stack/feat-eng-15090-adding-path-export-hint-on-credential-helper-install-rtlqvvxz branch from 71fb895 to 918d086 Compare October 14, 2026 15:43
Comment thread cloudsmith_cli/cli/commands/credential_helper/manage.py
cloudsmith-iduffy

This comment was marked as duplicate.

@click.option(
"--bin-dir", default=None, help="Directory to install the launcher binary."
"--bin-dir",
default=None,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not set the default here rather than on line 58?

@cloudsmith-iduffy cloudsmith-iduffy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@cloudsmith-iduffy
cloudsmith-iduffy enabled auto-merge (squash) October 14, 2026 23:14

This branch has not been deployed

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants