From 35758b75ed8549ea8c3bbf2c561defdfeb1a64ac Mon Sep 17 00:00:00 2001 From: Robert Shuford <75178461+robertshuford@users.noreply.github.com> Date: Thu, 6 Oct 2022 11:13:47 -0400 Subject: [PATCH] [Tests] github actions removed homebrew and broke shellcheck See https://github.com/actions/runner-images/issues/6283 --- .github/workflows/shellcheck.yml | 7 +++++-- install.sh | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index aafcb7f..53ff98f 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -34,11 +34,14 @@ jobs: github.com:443 pkg-containers.githubusercontent.com:443 - uses: actions/checkout@v2 - - name: Install shellcheck + - name: Set up Homebrew + uses: Homebrew/actions/setup-homebrew@master + - name: Install latest shellcheck run: brew install shellcheck env: HOMEBREW_NO_ANALYTICS: 1 - - run: "shellcheck --version" + - run: which shellcheck + - run: shellcheck --version - name: Run shellcheck on ${{ matrix.file }} run: shellcheck -s ${{ matrix.shell }} ${{ matrix.file }} diff --git a/install.sh b/install.sh index 2bf513a..949365b 100755 --- a/install.sh +++ b/install.sh @@ -362,6 +362,8 @@ nvm_do_install() { exit 1 fi fi + # Disable the optional which check, https://www.shellcheck.net/wiki/SC2230 + # shellcheck disable=SC2230 if nvm_has xcode-select && [ "$(xcode-select -p >/dev/null 2>/dev/null ; echo $?)" = '2' ] && [ "$(which git)" = '/usr/bin/git' ] && [ "$(which curl)" = '/usr/bin/curl' ]; then nvm_echo >&2 'You may be on a Mac, and need to install the Xcode Command Line Developer Tools.' # shellcheck disable=SC2016