Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion scripts/package/src/package_managers/cargo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
cargo::update_all() {
cargo install --list | grep -E '^[a-z0-9_-]+ v[0-9.]+:$' | cut -f1 -d' ' | xargs -n1 cargo install
# A plain `xargs cargo install` still runs once with no arguments when no crate is
# installed, and `cargo install` alone tries to install the current directory.
cargo install --list | grep -E '^[a-z0-9_-]+ v[0-9.]+:$' | cut -f1 -d' ' |
while read -r cargo_package; do
cargo install "$cargo_package"
done
output::answer "Done"
}