Skip to content

Commit

Permalink
fix: Fix cargo-binstall install issues. (#1196)
Browse files Browse the repository at this point in the history
* Fix bins.

* Bump.
  • Loading branch information
milesj authored Nov 21, 2023
1 parent 8a00a58 commit 65b1f28
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .yarn/versions/730be944.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
releases:
"@moonrepo/cli": patch
"@moonrepo/core-linux-arm64-gnu": patch
"@moonrepo/core-linux-arm64-musl": patch
"@moonrepo/core-linux-x64-gnu": patch
"@moonrepo/core-linux-x64-musl": patch
"@moonrepo/core-macos-arm64": patch
"@moonrepo/core-macos-x64": patch
"@moonrepo/core-windows-x64-msvc": patch
6 changes: 5 additions & 1 deletion crates/cli/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,11 @@ pub enum Commands {
},

// moon upgrade
#[command(name = "upgrade", about = "Upgrade to the latest version of moon.")]
#[command(
alias = "up",
name = "upgrade",
about = "Upgrade to the latest version of moon."
)]
Upgrade,
}

Expand Down
6 changes: 4 additions & 2 deletions crates/rust/platform/src/rust_platform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,14 +282,16 @@ impl Platform for RustPlatform {
let globals_dir = self.get_globals_dir(Some(tool));

// Install cargo-binstall if it does not exist
if !globals_dir.join("cargo-binstall").exists() {
if !globals_dir.join("cargo-binstall").exists()
&& !globals_dir.join("cargo-binstall.exe").exists()
{
debug!(
target: LOG_TARGET,
"{} does not exist, installing",
color::shell("cargo-binstall")
);

tool.exec_cargo(["install", "cargo-binstall"], working_dir)
tool.exec_cargo(["install", "cargo-binstall", "--force"], working_dir)
.await?;
}

Expand Down
6 changes: 6 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
- More accurately monitors signals (ctrl+c) and shutdowns.
- Tasks can now be configured with a timeout.

## Unreleased

#### 🐞 Fixes

- Fixed an issue where `cargo-binstall` would error when trying to install it and it already exists.

## 1.17.1

#### 🐞 Fixes
Expand Down

0 comments on commit 65b1f28

Please sign in to comment.