From 7090d6bb4f814302f7464dc7c2ed531c6db5b1f8 Mon Sep 17 00:00:00 2001 From: Pratham Patel Date: Wed, 10 Apr 2024 16:04:43 +0530 Subject: [PATCH] unix-setup.sh: run rustup only if I did not remove rustup from the packages list --- .local/scripts/other-common-scripts/unix-setup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.local/scripts/other-common-scripts/unix-setup.sh b/.local/scripts/other-common-scripts/unix-setup.sh index 7a8dd90..ddf6074 100644 --- a/.local/scripts/other-common-scripts/unix-setup.sh +++ b/.local/scripts/other-common-scripts/unix-setup.sh @@ -178,7 +178,11 @@ function home_manager_setup() { fi } function run_rustup() { - "${HOME}"/.local/scripts/other-common-scripts/rust-manage.sh "${HOME}"/.nix-profile/bin/rustup + RUSTUP_PATH="${HOME}"/.nix-profile/bin/rustup + + if [[ -x "${RUSTUP_PATH}" ]]; then + "${HOME}"/.local/scripts/other-common-scripts/rust-manage.sh "${HOME}"/.nix-profile/bin/rustup + fi } function chsh_to_bash() { if [[ "$(uname -s)" == 'Darwin' ]]; then