github / github/vscode-github-actions

The pythonLocation environment variable is shown as invalid access in this context

Abierto
#439 2 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
TypeScript
Estrellas
660
Forks
213
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### **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?

---

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza reproduciendo la advertencia del workflow mostrado en el issue e inspecciona el diagnóstico indicado en el panel Problems de VS Code. Rastrea cómo la extensión valida el acceso al contexto de las variables de entorno; se considera terminado cuando el uso documentado de pythonLocation ya no produce una advertencia de falso positivo y el workflow sigue siendo válido.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
github-actions, typescript, vscode
Área
ci-cd, developer-experience, tooling
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.