From f240d35eb56e7f1bd481147cf5e4d9f7cc47a227 Mon Sep 17 00:00:00 2001 From: Julien Vanier Date: Thu, 9 May 2024 15:13:55 -0400 Subject: [PATCH] UNIX: Turn off automatic updates when installing a specific version --- installer/unix/install-cli | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/installer/unix/install-cli b/installer/unix/install-cli index 22ccfb30c..33ea81d9d 100644 --- a/installer/unix/install-cli +++ b/installer/unix/install-cli @@ -110,12 +110,13 @@ fi mv -f "$TMP_FILE" "$DEST" chmod +x "$DEST" -# Run binary for the first time to make it install Node and the -# particle-cli npm module -"$DEST" > /dev/null 2>&1 - -echo ':::: Done!' -echo ':::: Installing dependencies' +# Turn off automatic updates when installing a specific version +if [ -n "$VERSION" ]; then + echo + echo ":::: Disabling automatic updates since a specific version was installed." + echo ":::: Reenable automatic updates by running \"particle update-cli --enable-updates\"" + "$DEST" update-cli --disable-updates > /dev/null 2>&1 +fi # Install dependencies function install_program { @@ -141,9 +142,6 @@ function install_program { install_program "openssl" -echo ':::: Done!' - - # Add ~/bin to the path function file_contains { grep "$2" "$1" 1>/dev/null 2>&1 @@ -160,7 +158,7 @@ fi EOL fi -echo ":::: Success!" +echo echo ":::: The Particle CLI has been installed to: \"$DEST\"" echo ":::: Your \"$SHELL_CONFIG\" file has been updated to properly set \$PATH" echo