We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7c80ab commit 4af21aaCopy full SHA for 4af21aa
ci/install.sh
@@ -6,9 +6,15 @@ function cargo_install() {
6
local version=$2
7
8
if command -v $name >/dev/null 2>&1; then
9
- echo "$name is already installed at $(command -v $name)"
+ local installed_version=`$name --version | sed -E 's/[a-zA-Z_-]+ v?//g'`
10
+ if [ "$installed_version" == "$version" ]; then
11
+ echo "$name $version is already installed at $(command -v $name)"
12
+ else
13
+ echo "Forcing install $name $version"
14
+ cargo install $name --version $version --force
15
+ fi
16
else
- echo "Installing $name"
17
+ echo "Installing $name $version"
18
cargo install $name --version $version
19
fi
20
}
0 commit comments