Fails to run on self hosted Windows runner if pip is not in PATH
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- github-actions, typescript
- Ambito
- ci-cd
Direzione di ricerca
Inizia dalla logica della cache di pip in src/cache-distributions/pip-cache.ts alle righe indicate, quindi confronta il modo in cui src/install-pypy.ts richiama gli strumenti Python installati. Riproduci il workflow self-hosted di Windows con update-environment disabilitato e verifica che il caching di pip abbia esito positivo quando pip non è presente in PATH.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description:
Downstream issue: https://github.com/msys2/msys2-autobuild/commit/fe4bcd08a9fbdd4a2874a67b4491991a76d784a7#commitcomment-153600091
Running the following on a self-hosted Windows runner leads to:
- uses: actions/setup-python@v5
id: python
with:
python-version: '3.13'
cache: 'pip'
cache-dependency-path: 'requirements.txt'
architecture: 'x64'
update-environment: false
error:
[error]Command failed: pip cache dir
'pip' is not recognized as an internal or external command,
operable program or batch file.
The problematic thing being "update-environment" (which we need to set, so it doesn't set cmake and pkg-config variables interfering with our builds. I don't mind the PATH, but setup-python only does all or nothing)
It looks like the cache code depends on pip being globally available, while it might not be: https://github.com/actions/setup-python/blob/9e62be81b28222addecf85e47571213eb7680449/src/cache-distributions/pip-cache.ts#L35-L41. This likely just works on the hosted runners since there pip is installed already.
In other places this is handled correctly by explicitly going through the just installed python/pip, for example: https://github.com/actions/setup-python/blob/9e62be81b28222addecf85e47571213eb7680449/src/install-pypy.ts#L177-L182
Action version:
actions/setup-python@v5
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version:
3.13, but any really
Repro steps:
See above
Expected behavior:
The action to run
Actual behavior:
It errors out
- Lingua principale
- TypeScript
- Stelle
- 2.2k
- Fork
- 739
- Merge medio
- 6g 18h
- PR unite (30g)
- 1
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di actions/setup-python
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
actions/setup-python#1348 · 5 commenti ·
-
feature request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
actions/setup-python#1346 · 12 commenti ·
-
feature request
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
actions/setup-python#1308 · 8 commenti ·
-
feature request
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
actions/setup-python#1301 · 5 commenti ·
-
feature request
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
actions/setup-python#1294 · 3 commenti · 2 reazioni ·
Tutte le issue di actions/setup-python
Issue simili
-
blocklist removal
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
pastelsky/bundlephobia#1122 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100