File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,13 +64,19 @@ jobs:
6464 addToPath : true
6565 architecture : $(PYTHON_ARCH)
6666
67- - script : echo "##vso[task.setvariable variable=PIP_CACHE_DIR]$(HOME)/.cache/pip"
68- condition : eq(variables['Agent.OS'], 'Linux')
69- displayName : ' Set PIP_CACHE_DIR for Linux '
70-
71- - script : echo "##vso[task.setvariable variable=PIP_CACHE_DIR]$(LocalAppData)\pip\Cache"
67+ - powershell : |
68+ $cachePath = Join-Path $env:LOCALAPPDATA "pip\Cache"
69+ if (!(Test-Path $cachePath)) { New-Item -ItemType Directory -Force -Path $cachePath }
70+ Write-Host "##vso[task.setvariable variable=PIP_CACHE_DIR]$cachePath"
71+ displayName: 'Set pip cache directory (Windows)'
7272 condition: eq(variables['Agent.OS'], 'Windows_NT')
73- displayName : ' Set PIP_CACHE_DIR for Windows'
73+
74+ - bash : |
75+ CACHE_DIR="$HOME/.cache/pip"
76+ mkdir -p "$CACHE_DIR"
77+ echo "##vso[task.setvariable variable=PIP_CACHE_DIR]$CACHE_DIR"
78+ displayName: 'Set pip cache directory (Linux)'
79+ condition: eq(variables['Agent.OS'], 'Linux')
7480
7581 - task : Cache@2
7682 inputs :
You can’t perform that action at this time.
0 commit comments