From 14b9b0765207449490bc67e133376288fab273a6 Mon Sep 17 00:00:00 2001 From: n4n5 <56606507+Its-Just-Nans@users.noreply.github.com> Date: Mon, 30 Dec 2024 10:33:06 +0100 Subject: [PATCH] use choco to download wget --- .github/workflows/test-action.yml | 8 -------- action/entrypoint.sh | 3 +++ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index c0249bd69..8e1e69987 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -12,10 +12,6 @@ jobs: - name: Checkout Actions Repository uses: actions/checkout@v4 - - name: Install wget for Windows - if: matrix.os == 'windows-latest' - run: choco install wget --no-progress - - name: Prepare file with mistakes. run: echo "Finallizes" > file.txt - name: Test force pass with mistakes @@ -43,10 +39,6 @@ jobs: with: fetch-depth: 0 - - name: Install wget for Windows - if: matrix.os == 'windows-latest' - run: choco install wget --no-progress - - name: Prepare file with mistakes. run: echo "Finallizes" > file.txt - name: Test force pass with mistakes diff --git a/action/entrypoint.sh b/action/entrypoint.sh index ba55c4662..d12065011 100755 --- a/action/entrypoint.sh +++ b/action/entrypoint.sh @@ -34,6 +34,9 @@ if [[ ! -x ${COMMAND} ]]; then elif [[ "$UNAME" == CYGWIN* || "$UNAME" == MINGW* || "$UNAME" == MSYS* ]] ; then TARGET_FILE="${ARCH}-pc-windows-msvc" FILE_EXT="zip" + if [[ ! -x $(command -v wget) ]] && [[ -x $(command -v choco) ]]; then + choco install wget --no-progress + fi else TARGET_FILE="${ARCH}-unknown-linux-musl" FILE_EXT="tar.gz"