diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 551656b..4bc5dce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -72,6 +72,19 @@ jobs: env: MSYSTEM: MINGW32 + shell: + runs-on: windows-latest + steps: + - uses: actions/checkout@v1 + - name: install deps + run: npm ci + - name: run action + uses: ./ + - shell: ./msys2.cmd {0} + run: | + uname -a + pacman -Syu --noconfirm + msystem: strategy: matrix: diff --git a/index.js b/index.js index c3263b1..3f55528 100644 --- a/index.js +++ b/index.js @@ -34,12 +34,20 @@ async function run() { let cmd = path.join(dest, 'msys2do.cmd'); fs.writeFileSync(cmd, [ - 'setlocal', - '@echo off', - 'IF NOT DEFINED MSYS2_PATH_TYPE set MSYS2_PATH_TYPE=' + core.getInput('path-type'), + `setlocal`, + `@echo off`, + `IF NOT DEFINED MSYS2_PATH_TYPE set MSYS2_PATH_TYPE=` + core.getInput('path-type'), `%~dp0\\msys64\\usr\\bin\\bash.exe -ilc "cd $OLDPWD && %*"` ].join('\r\n')); + fs.writeFileSync('C:/hostedtoolcache/windows/Python/3.6.8/x64/msys2.cmd', [ + `setlocal`, + `@echo off`, + `set "args=%*"`, + `set "args=%args:\\=/%"`, + cmd + ` %args%` + ].join('\r\n')); + core.addPath(dest); core.exportVariable('MSYSTEM', core.getInput('msystem'));