From be5e562828196ea3092052410f5b28afca8595db Mon Sep 17 00:00:00 2001 From: Jin <128556004+0xjinn@users.noreply.github.com> Date: Fri, 25 Aug 2023 11:01:10 -0700 Subject: [PATCH] [CLI] update cli script to have user use brew install if its macOS (#9648) * update cli script to have user use brew install if its macOS * update doc - remove macOS recommendation when installing from script * Update workflows (#9650) * Update semgrep.yaml to also run daily * update semgrep rule * fix workflows * Update .github/workflows/semgrep.yaml Co-authored-by: Balaji Arun --------- Co-authored-by: Balaji Arun --------- Co-authored-by: Gerardo Di Giacomo Co-authored-by: Balaji Arun --- .../docs/tools/aptos-cli/install-cli/index.md | 2 +- developer-docs-site/static/scripts/install_cli.py | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/developer-docs-site/docs/tools/aptos-cli/install-cli/index.md b/developer-docs-site/docs/tools/aptos-cli/install-cli/index.md index 8303315942679..af290c10a6fcf 100644 --- a/developer-docs-site/docs/tools/aptos-cli/install-cli/index.md +++ b/developer-docs-site/docs/tools/aptos-cli/install-cli/index.md @@ -6,7 +6,7 @@ title: "Install the Aptos CLI" You can install the Aptos CLI as a pre-compiled binary: -- [Install the Aptos CLI by script](./automated-install.md) - Recommended for Linux and Windows. MacOS is also supported. +- [Install the Aptos CLI by script](./automated-install.md) - Recommended for Linux and Windows. - [Install the Aptos CLI with Homebrew](./install-from-brew.md) - Recommended for MacOS. - [Download the prebuilt Aptos CLI binaries](./download-cli-binaries.md) - Ensures you get a stable version of the Aptos CLI built on a regular cadence from the `main` upstream development branch. diff --git a/developer-docs-site/static/scripts/install_cli.py b/developer-docs-site/static/scripts/install_cli.py index 3bce28e39a1b2..242fb54274fe2 100644 --- a/developer-docs-site/static/scripts/install_cli.py +++ b/developer-docs-site/static/scripts/install_cli.py @@ -450,11 +450,15 @@ def get_target(self): ) return None - if MACOS: - return "MacOSX-x86_64" - if WINDOWS: return "Windows-x86_64" + + if MACOS: + sys.stdout.write( + colorize("error", "You are trying to install from macOS. Please use brew to install Aptos CLI instead - [brew install aptos]") + ) + self._write("") + sys.exit(1) # On Linux, we check what version of OpenSSL we're working with to figure out # which binary to download.