Integrated PowerShell not working properly #10426

Closed
opened 2026-01-31 02:21:18 +00:00 by claunia · 7 comments
Owner

Originally created by @anshdhinhgra47 on GitHub (Aug 31, 2020).

Environment

Windows build number: [run OS Version: Windows_NT x64 10.0.18362 for powershell]
Windows Terminal version (if applicable):

Any other software?

Steps to reproduce

Stop the server using Ctrl +C

Expected behavior

On entering n/N as input, the server should not stop running.

Actual behavior

The integrated PowerShell stops the server even after accepting n/N as an input. An image for reference is attached below.

windows_powershell_error

Originally created by @anshdhinhgra47 on GitHub (Aug 31, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: [run OS Version: Windows_NT x64 10.0.18362 for powershell] Windows Terminal version (if applicable): Any other software? ``` # Steps to reproduce Stop the server using Ctrl +C # Expected behavior On entering n/N as input, the server should not stop running. # Actual behavior The integrated PowerShell stops the server even after accepting n/N as an input. An image for reference is attached below. ![windows_powershell_error](https://user-images.githubusercontent.com/56676059/91756221-04957600-ebea-11ea-9f1c-ae27351944dc.png)
claunia added the Issue-QuestionNeeds-Tag-FixResolution-Answered labels 2026-01-31 02:21:18 +00:00
Author
Owner

@WSLUser commented on GitHub (Sep 1, 2020):

Did you file also with VSCode (which you didn't mention but is clearly shown in the screenshot)?

@WSLUser commented on GitHub (Sep 1, 2020): Did you file also with VSCode (which you didn't mention but is clearly shown in the screenshot)?
Author
Owner

@anshdhinhgra47 commented on GitHub (Sep 1, 2020):

Yes, but they closed the issue and asked me to file here.

@anshdhinhgra47 commented on GitHub (Sep 1, 2020): Yes, but they closed the issue and asked me to file here.
Author
Owner

@WSLUser commented on GitHub (Sep 1, 2020):

Ok, then try using Windows Terminal. Also please link back the VS Code issue in case there are more details worth looking at. It comes with a newer conhost known as OpenConsole. If this works, you can either

  1. Continue to use Windows Terminal (recommended)
    or
  2. Disclaimer: Completely unsupported, not endorsed, here be dragons :
    Locate OpenConsole.exe, copy it to system32, rename to conhost.exe (backup the original first). now you'll be running a newer console by default for the OS. If new problems occur, you'll be on your own.
@WSLUser commented on GitHub (Sep 1, 2020): Ok, then try using Windows Terminal. Also please link back the VS Code issue in case there are more details worth looking at. It comes with a newer conhost known as OpenConsole. If this works, you can either 1) Continue to use Windows Terminal (recommended) or 2) **Disclaimer: Completely unsupported, not endorsed, here be dragons** : Locate OpenConsole.exe, copy it to system32, rename to conhost.exe (backup the original first). now you'll be running a newer console by default for the OS. If new problems occur, you'll be on your own.
Author
Owner

@WSLUser commented on GitHub (Sep 1, 2020):

Please also note you can configure VS Code to launch Windows Terminal as an external terminal in Settings for VS Code. Also would suggest a backport of the particular fix (once a bisect between conhost and openconsole is done) for this issue if it is indeed resolved using OpenConsole.

@WSLUser commented on GitHub (Sep 1, 2020): Please also note you can configure VS Code to launch Windows Terminal as an external terminal in Settings for VS Code. Also would suggest a backport of the particular fix (once a bisect between conhost and openconsole is done) for this issue if it is indeed resolved using OpenConsole.
Author
Owner

@anshdhinhgra47 commented on GitHub (Sep 1, 2020):

Alright.

@anshdhinhgra47 commented on GitHub (Sep 1, 2020): Alright.
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Sep 1, 2020):

AFAIK, the "Terminate batch job (Y/N)?" question comes from cmd.exe, rather than PowerShell. For example, if you have an progs.bat file that contains two lines

prog1.exe
prog2.exe

and you run progs.bat and press Ctrl+C while prog1.exe is running, then prog1.exe is first terminated; after that, cmd.exe asks whether you want to terminate progs.bat as a whole or proceed to run prog2.exe.

So, I suspect that:

  • Your npm start command runs some npm.bat or npm.cmd file, which then runs npm from its installation directory.
  • Your Ctrl+C has already terminated npm before the "Terminate batch job (Y/N)?" question appears.
  • The behavior would be the same even if VSCode, PowerShell, and Windows Terminal had not been installed.
@KalleOlaviNiemitalo commented on GitHub (Sep 1, 2020): AFAIK, the "Terminate batch job (Y/N)?" question comes from cmd.exe, rather than PowerShell. For example, if you have an `progs.bat` file that contains two lines ``` prog1.exe prog2.exe ``` and you run `progs.bat` and press Ctrl+C while `prog1.exe` is running, then `prog1.exe` is first terminated; after that, `cmd.exe` asks whether you want to terminate `progs.bat` as a whole or proceed to run `prog2.exe`. So, I suspect that: * Your `npm start` command runs some `npm.bat` or `npm.cmd` file, which then runs npm from its installation directory. * Your Ctrl+C has already terminated npm before the "Terminate batch job (Y/N)?" question appears. * The behavior would be the same even if VSCode, PowerShell, and Windows Terminal had not been installed.
Author
Owner

@DHowett commented on GitHub (Sep 2, 2020):

@KalleOlaviNiemitalo is correct.

@WSLUser’s suggestion will not change this reality, and he should not be suggesting it to people who are not having console problems 😄

@DHowett commented on GitHub (Sep 2, 2020): @KalleOlaviNiemitalo is correct. @WSLUser’s suggestion will not change this reality, and he should not be suggesting it to people who are not having _console problems_ 😄
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10426