PowerShell / PowerShell/vscode-powershell

`connect ENOENT \\.\pipe\PSES_fskvz4fs.gy4` appears, until VSC has been reinvoked, when a `.PS1` file is invoked in VSC, after cancelling a shutdown that was caused by a PS1 file, which was invoked by VSC.

Abierto
#5,307 1 comentario 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Issue-Bug Needs: Triage
Lenguaje dominante
TypeScript
Estrellas
1.9k
Forks
548
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Prerequisites
  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.
Summary

As was originally reported at microsoft/vscode/issues/244192:

connect ENOENT \\.\pipe\PSES_fskvz4fs.gy4 appears when a .PS1 file is invoked in VSC, after cancelling a shutdown that was caused by a PS1 file, which was invoked by VSC. The error ceases to appear after VSC has been (closed, then) reinvoked.

PowerShell Version

I did not collect this at the time. However, if relevant to issues/4332, it may contain them.

Extension Version

Logs

Visual Studio Code Version
Version: 1.98.2 (user setup)
Commit: ddc367ed5c8936efe395cffeec279b04ffd7db78
Date: 2025-03-12T13:32:45.399Z
Electron: 34.2.0
ElectronBuildId: 11161602
Chromium: 132.0.6834.196
Node.js: 20.18.2
V8: 13.2.152.36-electron.0
OS: Windows_NT x64 10.0.26120
Steps to Reproduce
  1. Invoke a .PS1 file containing shutdown /r /fw via VSC's GUI: ^1

    #!/usr/bin/env pwsh
    #Requires -PSEdition 'Core'
    #Requires -Version 7.5.0
    If ([OperatingSystem]::IsWindows() -Eq $True) {
    	sudo shutdown /r /fw /t 0
    }
    
  2. Cancel when it prompts the user to, because of unkillable processes.

  3. Reinvoke the file. It causes the undermentioned:

    A Screenshot

  4. WM_CLOSE code. ^3

  5. Invoke code.

  6. Invoke the file again. It'll function.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza reproduciendo la secuencia de Windows VS Code del issue: invoca el archivo .PS1, cancela el apagado, vuelve a invocarlo, cierra VS Code con WM_CLOSE y vuelve a abrirlo. Inspecciona los logs disponibles de la extensión y la gestión de procesos o pipes en torno al fallo; estará terminado cuando el archivo se pueda volver a invocar después de cancelar el apagado sin el error connect ENOENT.

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

Evaluación

Stack tecnológico
powershell, typescript, vscode
Área
desktop, devtools
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 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.