mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-21 21:18:42 +00:00

and also test `fetch_crate_cratesio_version_matched` in `e2e-tests/live.sh`. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
21 lines
572 B
Bash
Executable file
21 lines
572 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -euxo pipefail
|
|
|
|
unset CARGO_INSTALL_ROOT
|
|
|
|
CARGO_HOME=$(mktemp -d 2>/dev/null || mktemp -d -t 'cargo-home')
|
|
export CARGO_HOME
|
|
othertmpdir=$(mktemp -d 2>/dev/null || mktemp -d -t 'cargo-test')
|
|
export PATH="$CARGO_HOME/bin:$othertmpdir/bin:$PATH"
|
|
|
|
mkdir -p "$othertmpdir/bin"
|
|
# Copy it to bin to test use of env var `CARGO`
|
|
cp "./$1" "$othertmpdir/bin/"
|
|
|
|
cargo binstall --no-confirm cargo-audit@0.17.5 --strategies crate-meta-data
|
|
|
|
cargo_audit_version="$(cargo audit --version)"
|
|
echo "$cargo_audit_version"
|
|
|
|
[ "$cargo_audit_version" = "cargo-audit 0.17.5" ]
|