Skip to content

Commit 0737d2f

Browse files
committed
fix: replace broken choco pyenv-win install with official PowerShell installer (Fixes #446)
1 parent d482aa7 commit 0737d2f

3 files changed

Lines changed: 22 additions & 13 deletions

File tree

.github/workflows/coverage-baseline.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,13 @@ jobs:
7979
- name: Install pyenv (Windows)
8080
if: startsWith(matrix.os, 'windows')
8181
run: |
82-
choco install pyenv-win -y
83-
echo "PATH=$PATH;$HOME/.pyenv/pyenv-win/bin;$HOME/.pyenv/pyenv-win/shims" >> $GITHUB_ENV
84-
echo "PYENV_ROOT=$HOME/.pyenv" >> $GITHUB_ENV
85-
shell: bash
82+
Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1"
83+
$pyenvBin = "$env:USERPROFILE\.pyenv\pyenv-win\bin"
84+
$pyenvShims = "$env:USERPROFILE\.pyenv\pyenv-win\shims"
85+
echo "$pyenvBin" >> $env:GITHUB_PATH
86+
echo "$pyenvShims" >> $env:GITHUB_PATH
87+
echo "PYENV_ROOT=$env:USERPROFILE\.pyenv" >> $env:GITHUB_ENV
88+
shell: pwsh
8689

8790
- name: Install pyenv and pyenv-virtualenv (Linux)
8891
if: startsWith(matrix.os, 'ubuntu')

.github/workflows/coverage.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,13 @@ jobs:
108108
- name: Install pyenv (Windows)
109109
if: startsWith(matrix.os, 'windows')
110110
run: |
111-
choco install pyenv-win -y
112-
echo "PATH=$PATH;$HOME/.pyenv/pyenv-win/bin;$HOME/.pyenv/pyenv-win/shims" >> $GITHUB_ENV
113-
echo "PYENV_ROOT=$HOME/.pyenv" >> $GITHUB_ENV
114-
shell: bash
111+
Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1"
112+
$pyenvBin = "$env:USERPROFILE\.pyenv\pyenv-win\bin"
113+
$pyenvShims = "$env:USERPROFILE\.pyenv\pyenv-win\shims"
114+
echo "$pyenvBin" >> $env:GITHUB_PATH
115+
echo "$pyenvShims" >> $env:GITHUB_PATH
116+
echo "PYENV_ROOT=$env:USERPROFILE\.pyenv" >> $env:GITHUB_ENV
117+
shell: pwsh
115118

116119
- name: Install pyenv and pyenv-virtualenv (Linux)
117120
if: startsWith(matrix.os, 'ubuntu')

.github/workflows/pr-check.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,16 @@ jobs:
110110
echo "WORKON_HOME=$HOME/.virtualenvs" >> $GITHUB_ENV
111111
shell: bash
112112

113-
- name: Install pyenv
113+
- name: Install pyenv (Windows)
114114
if: startsWith( matrix.os, 'windows')
115115
run: |
116-
choco install pyenv-win -y
117-
echo "PATH=$PATH;$HOME/.pyenv/pyenv-win/bin;$HOME/.pyenv/pyenv-win/shims" >> $GITHUB_ENV
118-
echo "PYENV_ROOT=$HOME/.pyenv" >> $GITHUB_ENV
119-
shell: bash
116+
Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1"
117+
$pyenvBin = "$env:USERPROFILE\.pyenv\pyenv-win\bin"
118+
$pyenvShims = "$env:USERPROFILE\.pyenv\pyenv-win\shims"
119+
echo "$pyenvBin" >> $env:GITHUB_PATH
120+
echo "$pyenvShims" >> $env:GITHUB_PATH
121+
echo "PYENV_ROOT=$env:USERPROFILE\.pyenv" >> $env:GITHUB_ENV
122+
shell: pwsh
120123

121124
- name: Install pyenv and pyenv-virtualenv
122125
if: startsWith( matrix.os, 'ubuntu') || startsWith( matrix.os, 'macos')

0 commit comments

Comments
 (0)