diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-01-04 06:50:09 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-01-04 06:51:37 +0300 |
commit | 64b5d8a0d424030c821b41334f507a424abf0d2c (patch) | |
tree | cb74afd26eeb08716e3ad67cc22fdf0d4f57f6d5 | |
parent | refactoring (diff) | |
download | setup-cygwin-64b5d8a0d424030c821b41334f507a424abf0d2c.tar.gz setup-cygwin-64b5d8a0d424030c821b41334f507a424abf0d2c.zip |
set %CYGWIN% before installing Cygwin
-rw-r--r-- | action.yml | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -26,16 +26,21 @@ runs: steps: - run: | New-Variable os -Value ('${{ runner.os }}') -Option Constant - New-Variable windows_host -Value ($os -eq 'Windows') -Option Constant - New-Variable x64 -Value ('${{ inputs.platform }}' -eq 'x64') -Option Constant - New-Variable install_dir -Value '${{ inputs.install-dir }}' -Option Constant - New-Variable packages -Value '${{ inputs.packages }}' -Option Constant - if (!$windows_host) { throw "Sorry, installing Cygwin is unsupported on $os" } + shell: pwsh + + - run: | + echo 'CYGWIN=${{ inputs.env }}' >> $env:GITHUB_ENV + shell: pwsh + + - run: | + New-Variable x64 -Value ('${{ inputs.platform }}' -eq 'x64') -Option Constant + New-Variable install_dir -Value '${{ inputs.install-dir }}' -Option Constant + New-Variable packages -Value '${{ inputs.packages }}' -Option Constant function Locate-Choco { $path = Get-Command 'choco' -ErrorAction SilentlyContinue @@ -46,8 +51,6 @@ runs: } } - echo 'CYGWIN=${{ inputs.env }}' >> $env:GITHUB_ENV - $choco = Locate-Choco $choco_params = @( 'install', |