Skip to content

Commit 56e722b

Browse files
committed
fix: use environment variable for PIP_ROOT_USER_ACTION
This extends the fix from actions#259 since every platform for 3.8.10 / 3.9.13 has been rebuilt instead of just macOS arm64 being added. The regression was introduced in actions#223
1 parent d05150c commit 56e722b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

installers/nix-setup-template.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ fi
4949
chmod +x ../python $PYTHON_MAJOR $PYTHON_MAJOR_DOT_MINOR $PYTHON_MAJORMINOR python
5050

5151
echo "Upgrading pip..."
52+
export PIP_ROOT_USER_ACTION=ignore
5253
./python -m ensurepip
53-
./python -m pip install --ignore-installed pip --disable-pip-version-check --no-warn-script-location --root-user-action=ignore
54+
./python -m pip install --ignore-installed pip --disable-pip-version-check --no-warn-script-location
5455

5556
echo "Create complete file"
5657
touch $PYTHON_TOOLCACHE_VERSION_PATH/x64.complete

installers/win-setup-template.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ if ($MajorVersion -ne "2") {
133133
}
134134

135135
Write-Host "Install and upgrade Pip"
136+
$Env:PIP_ROOT_USER_ACTION = "ignore"
136137
$PythonExePath = Join-Path -Path $PythonArchPath -ChildPath "python.exe"
137-
cmd.exe /c "$PythonExePath -m ensurepip && $PythonExePath -m pip install --upgrade pip --no-warn-script-location --root-user-action=ignore"
138+
cmd.exe /c "$PythonExePath -m ensurepip && $PythonExePath -m pip install --upgrade pip --no-warn-script-location"
138139
if ($LASTEXITCODE -ne 0) {
139140
Throw "Error happened during pip installation / upgrade"
140141
}

0 commit comments

Comments
 (0)