github / github/vscode-github-actions
The pythonLocation environment variable is shown as invalid access in this context
- Langage dominant
- TypeScript
- Étoiles
- 660
- Forks
- 213
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
### **Describe the bug**
When using the `pythonLocation` environment variable set by the `actions/setup-python` action, this extension reports "Context access might be invalid" even though it is a valid environment variable documented in the official setup-python action.
### **To Reproduce**
Steps to reproduce the behavior:
1. With this workflow:
```yaml
name: Test Workflow
on:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Cache pip
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}/.cache/pip
key: python-${{ hashFiles('setup.py', 'pyproject.toml') }}
```
2. Open the "Problems" panel in VS Code.
3. See the error:
```
Context access might be invalid: pythonLocation
```
### **Expected behavior**
The `pythonLocation` environment variable, which is documented and valid when using `actions/setup-python`, should be recognized properly by this extension.
### **Screenshots**
If applicable, include screenshots of the warning in the Problems panel.
### **Extension Version**
`vX.Y.Z`
### **Additional context**
- Official documentation for the `pythonLocation` variable: [[setup-python environment variables](https://github.com/actions/setup-python#outputs-and-environment-variables)](https://github.com/actions/setup-python#outputs-and-environment-variables).
- This warning is a false positive, as the workflow executes without issues and the variable is set correctly.
- Is this a bug or a limitation of the extension?
---
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par reproduire l’avertissement du workflow présenté dans l’issue et examinez le diagnostic signalé dans le panneau Problems de VS Code. Suivez la manière dont l’extension valide l’accès au contexte des variables d’environnement ; le travail est terminé lorsque l’utilisation documentée de pythonLocation ne produit plus de faux avertissement et que le workflow reste valide.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- github-actions, typescript, vscode
- Domaine
- ci-cd, developer-experience, tooling
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100