Update PY_PYTHON env var on windows with installed version if update-environment is true
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- github-actions, python, typescript
- Bereich
- devops, operating-systems
Rechercherichtung
Beginne in src/find-python.ts bei der im Issue referenzierten Behandlung von update-environment und verfolge, wie Umgebungsvariablen für installierte Versionen unter Windows aktualisiert werden. Die Änderung ist abgeschlossen, wenn update-environment zusätzlich PY_PYTHON auf die angeforderte installierte Version setzt, damit der Windows-py-Launcher sie auswählt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Description:
The update-environment flag updates seems to update a bunch of env variables to point at the newly installed version (cypthon example: https://github.com/actions/setup-python/blob/main/src/find-python.ts#L111).
Could it also add the PY_PYTHON=<version> on Windows whenever update-environment is true? This will make the default version for the Windows py launcher match the one requested - even if the runner has another version already installed.
Justification:
In short: make sure that py <script.py> runs on the version of python that you just installed with setup-python.
I bumped into this because we had some scripts running on a windows runner using py <script.py> in an action. The runner updated, everything broke, and we noticed that even though setup-python is installing everything correctly - if another version is there (in this case a newer version) running anything with py can use the other version instead of the one that was just installed by setup-python.
Are you willing to submit a PR?
Happy to! I just didn't want to to put time into it if the feature is not a good idea / I'm missing something. Setting the PY_PYTHON env var in the actions worked for my specific case, though I'm wondering if to do it in general it should set any other py launcher related variables to match the newly installed python too.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2.2k
- Forks
- 739
- Ø Merge
- 6 T. 18 Std.
- Gemergte PRs (30 T.)
- 1
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus actions/setup-python
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
actions/setup-python#1348 · 5 Kommentare ·
-
feature request
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
actions/setup-python#1346 · 12 Kommentare ·
-
feature request
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 58/100
actions/setup-python#1308 · 8 Kommentare ·
-
feature request
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 35/100
actions/setup-python#1301 · 5 Kommentare ·
-
feature request
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
actions/setup-python#1294 · 3 Kommentare · 2 Reaktionen ·
Alle Issues in actions/setup-python
Ähnliche Issues
-
blocklist removal
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
pastelsky/bundlephobia#1122 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100