terminal
terminal copied to clipboard
Degradation with multiple tabs and using `nvm`
Windows Terminal version
1.15.2874.0
Windows build number
10.0.19045.2251
Other Software
- nvm-windows 1.1.10
-
Node.js 16.17.0 installed via
nvm-windows
- NestJS 9.0.0
Steps to reproduce
- Download and run
nvm-setup.exe
from nvm-windows releases page - Insall
Node.js 16.17.0
vianvm-windows
:
nvm install 16.17.0
- Install
NestJS
:npm i -g @nestjs/cli
- Create projects:
cd /d C:\
nest new project-1
# select `npm` and press `Enter`
nest new project-2
# select `npm` and press `Enter`
nest new project-3
# select `npm` and press `Enter`
- Create a
start.bat
file to run 3 tabs with the created projects:
wt new-tab --title "Project 1" --suppressApplicationTitle -d "C:/project-1/" "%APPDATA%\nvm\v16.17.0\npm.cmd run start:dev"; new-tab --title "Project 2" --suppressApplicationTitle -d "C:/project-2/" "%APPDATA%\nvm\v16.17.0\npm.cmd run start:dev"; new-tab --title "Project 3" --suppressApplicationTitle -d "C:/project-3/" "%APPDATA%\nvm\v16.17.0\npm.cmd run start:dev"; focus-tab -t 0
- Set
Startup
>New instance behavior
toCreate a new window
- Close all the
Windows Terminal
instances - Run
start.bat
Expected Behavior
- Only one window is opened
- 3 tabs with correct titles is opened (specified in bat-file)
- The titles do not change over time
- Tabs order is same as in bat-file
- Focus changed to the first tab
- Every project in every tab is immediately started
- Closing Windows Terminal stops node instances
- Working with
npm run dev
inside of bat-file
Actual Behavior
- 3 windows instead of 1 is started (can be fixed by
Startup
>New instance behavior
>Attach to the most recently used window
setting, but this is dirty!) - Titles is not always correct (some randomness here)
- Titles change to "Default" over time
- Tabs order is random
- Focus to the first tab is not changed, a last tab is focused
- Project in the first opened tab is not started while you not switch to that tab manualy
- Closing Windows Terminal don't stops node instances
- Full path of
npm
must be specified because of symbol link fromC:\Program Files\nodejs
to%APPDATA%\nvm\v16.17.0\
directory
Related issue: https://github.com/microsoft/terminal/issues/9628
This successfully runs with cmd /k
and with disabled Run this profile as Administrator
option or with a created shotcut to the bat-file with an enabled property Advanced > Run as administrator
.
wt -w MyProject new-tab --title "Project 1" --suppressApplicationTitle -d "C:/project-1/" cmd /k "npm run start:dev"; new-tab --title "Project 2" --suppressApplicationTitle -d "C:/project-2/" cmd /k "npm run start:dev"; new-tab --title "Project 3" --suppressApplicationTitle -d "C:/project-3/" cmd /k "npm run start:dev"; focus-tab -t 0
Commandline args actually use the same code as startupActions. So we're going to mark this as a /dup of #14442. Thanks.
Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
This is not a duplicate. Here are 8 (!) issues that are only hides by changing the administrator stuff. This doesn't mean that these issues don't need to be fixed. Please don't lose sight of them.
For example, my tab titles change by themselves to "Command Promt" now (like in an issue number 3 in the list above).
(For what it's worth, we do try to avoid having "blanket bugs" - it makes tracking them surprisingly difficult. After all: they do not represent indivisible units of work...) I would reckon that at least six of them are already tracked in the approx. 1500 open issues, it's just that we have not gone back and looked up all of those duplicates.
Sorry for the inconvenience, and thank you for following up :)