Skip to content

Install josh binaries into a local directory#53

Merged
Kobzol merged 3 commits into
rust-lang:mainfrom
Kobzol:installation-progress
Jul 23, 2026
Merged

Install josh binaries into a local directory#53
Kobzol merged 3 commits into
rust-lang:mainfrom
Kobzol:installation-progress

Conversation

@Kobzol

@Kobzol Kobzol commented Jun 29, 2026

Copy link
Copy Markdown
Member

This PR changes josh-sync so that it install josh binaries into a .josh-sync/cargo directory in the user's HOME directory, to avoid clashing with global Cargo installed binaries.
It also shows the installation progress, to avoid a long duration without any output.

It still installs the commands globally on CI, to make more effective use of caching (via rust-cache).

Fixes: #50

@tgross35

Copy link
Copy Markdown
Contributor

Could this be in ~/.local/bin/josh-sync/ or similar? To avoid some home directory pollution

@Kobzol

Kobzol commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

That would be this, right? I don't just want to hardcode it for Linux :P

@tgross35

Copy link
Copy Markdown
Contributor

I was thinking this one https://docs.rs/dirs/latest/dirs/fn.executable_dir.html but maybe data dir is better since this needs a subdirectory. The same ~/.local directory should be fine on Mac and Windows too, at least I have a number of CLI utils that opted for that.

Or configurable via env would be fine, just preferably some way to avoid a new top-level directory in ~ :)

@Kobzol

Kobzol commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

I wanted to avoid depending on a new dependency, only to find out that we already depend on directories 😆 So I just used its data local directory.

Comment thread src/josh.rs
@Kobzol

Kobzol commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

Seeing as there was no additional feedback in the meantime, I'll merge this.

@Kobzol
Kobzol merged commit b07ae40 into rust-lang:main Jul 23, 2026
1 check passed
@Kobzol
Kobzol deleted the installation-progress branch July 23, 2026 07:08
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.

josh-sync should not just silently invoke cargo install

3 participants