From 29789a40b03947975a055dbccfb6b0bd77a966f6 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 2 May 2022 10:35:45 +0000 Subject: [PATCH] fix(rust): remove --locked --- linux/ubuntu/scripts/rust.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/linux/ubuntu/scripts/rust.sh b/linux/ubuntu/scripts/rust.sh index 7e0f499..6c7b342 100755 --- a/linux/ubuntu/scripts/rust.sh +++ b/linux/ubuntu/scripts/rust.sh @@ -4,6 +4,7 @@ set -Eeuxo pipefail . /etc/environment +. /imagegeneration/installers/helpers/os.sh export RUSTUP_HOME=/usr/share/rust/.rustup export CARGO_HOME=/usr/share/rust/.cargo @@ -18,7 +19,11 @@ curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=stable --profil source "${CARGO_HOME}/env" rustup component add rustfmt clippy -cargo install --locked bindgen cbindgen cargo-audit cargo-outdated +if isUbuntuVer "22"; then + cargo install bindgen cbindgen cargo-audit cargo-outdated +else + cargo install --locked bindgen cbindgen cargo-audit cargo-outdated +fi chmod -R 777 "$(dirname "${RUSTUP_HOME}")" # cleanup