changeset 62:495a0733b2c0

Check if MinGW directory exists before unzipping
author Paper <37962225+mrpapersonic@users.noreply.github.com>
date Thu, 21 Jul 2022 01:49:39 -0400
parents 61fa41e1678f
children a2e979245441
files .github/workflows/build.yml
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/.github/workflows/build.yml	Thu Jul 21 01:22:47 2022 -0400
+++ b/.github/workflows/build.yml	Thu Jul 21 01:49:39 2022 -0400
@@ -17,10 +17,12 @@
 
     - name: Setup MinGW
       run: |
-        Invoke-WebRequest -OutFile mingw-get.zip "https://osdn.net/dl/mingw/mingw-get-0.6.3-mingw32-pre-20170905-1-bin.zip" -UserAgent "curl/7.55.1"
-        Expand-Archive -Path mingw-get.zip -DestinationPath C:\MinGW
-        Remove-Item -Path mingw-get.zip
-        C:\MinGW\bin\mingw-get.exe install mingw32-base-bin
+        if (!(Test-Path "C:\MinGW")) {
+          Invoke-WebRequest -OutFile mingw-get.zip "https://osdn.net/dl/mingw/mingw-get-0.6.3-mingw32-pre-20170905-1-bin.zip" -UserAgent "curl/7.55.1"
+          Expand-Archive -Path mingw-get.zip -DestinationPath C:\MinGW
+          Remove-Item -Path mingw-get.zip
+          C:\MinGW\bin\mingw-get.exe install mingw32-base-bin
+        }
       shell: pwsh
 
     - uses: actions/checkout@v2