@@ -358,14 +358,17 @@ jobs:
358358 # possibly if it outputs messages to stderr)
359359 conda install --update-deps -q -y $CONDA_DEPENDENCIES
360360 if test "${{matrix.TARGET}}" = 'win'; then
361- echo "" > "$RUNNER_TEMP/pip-empty.ini"
362- export PIP_CONFIG_FILE="$RUNNER_TEMP/pip-empty.ini"
363- # persist for any subshells / subsequent steps that might run a replaced pip
364- echo "PIP_CONFIG_FILE=$RUNNER_TEMP/pip-empty.ini" >> "$GITHUB_ENV"
365- # belt & suspenders: set typical Windows dirs so platformdirs won't wander
366- export PROGRAMDATA="${PROGRAMDATA:-C:\\ProgramData}"
367- export APPDATA="${APPDATA:-$USERPROFILE\\AppData\\Roaming}"
368- export LOCALAPPDATA="${LOCALAPPDATA:-$USERPROFILE\\AppData\\Local}"
361+ # Ensure the registry keys that platformdirs looks for actually exist
362+ reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" ^
363+ /v "Common AppData" /t REG_SZ /d "C:\ProgramData" /f
364+ reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" ^
365+ /v "AppData" /t REG_EXPAND_SZ /d "%%USERPROFILE%%\AppData\Roaming" /f
366+ reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" ^
367+ /v "Local AppData" /t REG_EXPAND_SZ /d "%%USERPROFILE%%\AppData\Local" /f
368+ # Helpful environment fallbacks (not strictly required once registry exists)
369+ echo "PROGRAMDATA=C:\ProgramData" >> "$GITHUB_ENV"
370+ echo "APPDATA=%USERPROFILE%\AppData\Roaming" >> "$GITHUB_ENV"
371+ echo "LOCALAPPDATA=%USERPROFILE%\AppData\Local" >> "$GITHUB_ENV"
369372 fi
370373 if test -z "${{matrix.slim}}"; then
371374 # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely
0 commit comments