Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
audacioustux committed Dec 5, 2023
1 parent 420ced4 commit 7bdb691
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/cargo-bin/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@
"name": "Cargo Install",
"id": "cargo-bin",
"version": "1.0.0",
"description": "Installs binary crates with 'cargo install'",
"description": "Installs binary crates",
"options": {
"crates": {
"type": "string",
"default": "",
"description": "space separated list of crates to install"
},
"use-bininstall": {
"type": "boolean",
"default": true,
"description": "use bininstall instead of cargo install"
}
},
"installsAfter": [
Expand Down
7 changes: 6 additions & 1 deletion src/cargo-bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@

set -eax

cargo install ${CRATES:?}
if ${USE_BINSTALL:-false}; then
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall --no-confirm --no-symlinks ${CRATES:?}
else
cargo install ${CRATES:?}
fi

0 comments on commit 7bdb691

Please sign in to comment.