mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-15 15:16:37 +00:00
Add a --bin argument to mirror cargo install --bin.
This commit is contained in:
parent
ea65a39d2d
commit
75b3ef44fe
6 changed files with 49 additions and 6 deletions
21
e2e-tests/specific-binaries.sh
Executable file
21
e2e-tests/specific-binaries.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
unset CARGO_INSTALL_ROOT
|
||||
|
||||
CARGO_HOME=$(mktemp -d 2>/dev/null || mktemp -d -t 'cargo-home')
|
||||
export CARGO_HOME
|
||||
export PATH="$CARGO_HOME/bin:$PATH"
|
||||
|
||||
# Install a specific binary (e.g., ripgrep)
|
||||
"./$1" binstall --no-confirm ripgrep --bin rg
|
||||
|
||||
# Verify that the binary was installed and is executable
|
||||
if ! command -v rg >/dev/null 2>&1; then
|
||||
echo "rg was not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Run the binary to check it works
|
||||
rg --version
|
Loading…
Add table
Add a link
Reference in a new issue