Skip to content

Commit

Permalink
chore: Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin Blackman committed Oct 6, 2023
1 parent 00ca465 commit 16124e7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.

## [1.4.0](https://github.com/dustinblackman/cargo-run-bin/compare/v1.3.2..v1.4.0) - 2023-10-04

### ⛰️ Features
### ⛰️ Features

- Support git in package source - ([7151499](https://github.com/dustinblackman/cargo-run-bin/commit/7151499b4b47861f84c63b958af8cd36aa8648a9))

Expand Down Expand Up @@ -43,7 +43,7 @@ All notable changes to this project will be documented in this file.

## [1.3.0](https://github.com/dustinblackman/cargo-run-bin/compare/v1.2.0..v1.3.0) - 2023-09-20

### ⛰️ Features
### ⛰️ Features

- Add cargo-gha to path if it exists - ([c404b48](https://github.com/dustinblackman/cargo-run-bin/commit/c404b480e17e9abf12586dc865111d7546609849))
- Add alias scripts - ([3c6dbac](https://github.com/dustinblackman/cargo-run-bin/commit/3c6dbace4e5f2e1442f7da9805aa5a61e8ba5c9b))
Expand All @@ -56,7 +56,7 @@ All notable changes to this project will be documented in this file.

## [1.2.0](https://github.com/dustinblackman/cargo-run-bin/compare/v1.1.5..v1.2.0) - 2023-08-26

### ⛰️ Features
### ⛰️ Features

- Add support for Cargo workspaces - ([208b000](https://github.com/dustinblackman/cargo-run-bin/commit/208b000f47ee7666009a066a9f2a5124275ea381))

Expand Down Expand Up @@ -127,7 +127,7 @@ All notable changes to this project will be documented in this file.

## [1.1.1](https://github.com/dustinblackman/cargo-run-bin/compare/v1.0.1..v1.1.1) - 2023-08-08

### ⛰️ Features
### ⛰️ Features

- Add binstall support - ([f702124](https://github.com/dustinblackman/cargo-run-bin/commit/f702124692e23f8c14040cf0935b90c4877ed4ee))

Expand Down Expand Up @@ -155,7 +155,7 @@ All notable changes to this project will be documented in this file.

## [1.0.0] - 2023-08-07

### ⛰️ Features
### ⛰️ Features

- Add sync aliases - ([5d7ffed](https://github.com/dustinblackman/cargo-run-bin/commit/5d7ffed87bb9ff7b78ce7a228379a35492e45f11))
- Add build and run functionality - ([9a7218c](https://github.com/dustinblackman/cargo-run-bin/commit/9a7218c20c09797097b518a605c1d2b6c365ec30))
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ cargo-binstall = { version = "1.1.2" }
cargo-nextest = { version = "0.9.57", locked = true }
```

| Parameter | Type | Required | Description |
| ---------------- | ------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| version | `String` | true | Specifies the version of the crate. |
| Parameter | Type | Required | Description |
| ---------------- | ------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| version | `String` | true | Specifies the version of the crate. |
| bins | `Vec<String>` | false | An array of binaries that the crate contains that you wish to build. These can be found in a crates `Cargo.toml` file. See [`cargo-mobile2`](https://github.com/tauri-apps/cargo-mobile2/blob/a5f3783870f48886e3266e43f92a6768fb1eb3d4/Cargo.toml#L18-L28) as an example. |
| locked | `Boolean` | false | A parameter when set to `true` runs `cargo install` with the [`--locked`](https://doc.rust-lang.org/cargo/commands/cargo-install.html#dealing-with-the-lockfile) parameter. |
| features | `Vec<String>` | false | An array of crate features to enable. |
| default-features | `Boolean` | false | When set to `false`, disables all default features. |
| git | String | false | A git URL to install from rather than from crates.io. This will also be used by Binstall to look up Cargo manifist if Binstall is available. |
| branch | String | false | A git branch to install from when `git` is set. This takes priority over `tag` and `rev` |
| tag | String | false | A git tag to install from when `git` is set. `branch` will take priority if set, and takes priority over `rev`. |
| rev | String | false | A git revision to install from when `git` is set. `branch` and `tag` will take priority if set. |
| locked | `Boolean` | false | A parameter when set to `true` runs `cargo install` with the [`--locked`](https://doc.rust-lang.org/cargo/commands/cargo-install.html#dealing-with-the-lockfile) parameter. |
| features | `Vec<String>` | false | An array of crate features to enable. |
| default-features | `Boolean` | false | When set to `false`, disables all default features. |
| git | String | false | A git URL to install from rather than from crates.io. This will also be used by Binstall to look up Cargo manifist if Binstall is available. |
| branch | String | false | A git branch to install from when `git` is set. This takes priority over `tag` and `rev` |
| tag | String | false | A git tag to install from when `git` is set. `branch` will take priority if set, and takes priority over `rev`. |
| rev | String | false | A git revision to install from when `git` is set. `branch` and `tag` will take priority if set. |

If you're a fan of prebuilt binaries and fast downloads, run-bin will use [`cargo-binstall`](https://github.com/cargo-bins/cargo-binstall) if it's installed globally, or configured within `[package.metadata.bin]`, rather than building tools from source.

Expand Down
5 changes: 4 additions & 1 deletion src/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ pub fn run(bin_path: String, args: Vec<String>) -> Result<()> {
let project_root = metadata::get_project_root()?;
let mut shell_paths = vec![];

let runbin = project_root.join(".bin/.shims").to_string_lossy().to_string();
let runbin = project_root
.join(".bin/.shims")
.to_string_lossy()
.to_string();
if !system_shell_paths.contains(&runbin) {
shell_paths.push(runbin);
}
Expand Down

0 comments on commit 16124e7

Please sign in to comment.