-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ng overwrites/hides Windows Command Prompt title #19205
Comments
Actually, I also had to comment out the following use of
Otherwise, the window title would just be the very useless "ngcc". With those two places commented out, it now works great. |
@wqoq What is the title when you comment out the code for We set While we understand that this might not be very useful for you in Windows Command Prompt, it has worked well in other shells and operating systems. Have you explored the option of using a different shell such as PowerShell, Cygwin, or Windows Subsystem for Linux (WSL)? Since the behavior of setting |
@kyliau I generally run
So I would argue that using Commenting it out of ngcc, as in scenario (2), gets me some of the way there. I can at least see which project is running in each window. But I would ideally prefer to run them in scenario (3), where my custom title isn't overwritten. I don't think switching to another shell is the solution. I just tried Powershell, and the exact same scenarios happen the exact same way. Indeed, process.title is doing exactly as it is designed to do—overwrite the window title. I even opened an issue with Node.js to suggest process.title is doing the wrong thing in Windows, but they disagreed and suggested the problem lies in how each package is using process.title. If you're aware the behaviour of setting process.title varies from OS to OS, then it seems to me like you shouldn't be using process.title at all. And like I stated originally, things work perfectly if I make it stop using process.title. Also, FYI, I find it incredibly rude to ask me questions, and then immediately close the issue. Makes me feel like you're not interested in hearing my answers. |
@wqoq my apologies, I definitely didn't mean it that way. |
Just tested this on my Windows box: Using WSL with Ubuntu in Windows Terminal, I always saw I tried command prompt and PowerShell both in their traditional windows and with Windows Terminal. In all cases, running Playing around a little more, I made a simple test Node script to compare the default value of // test.js
console.log(process.title);
setTimeout(() => {}, 5000); // Hang for 5 seconds just to observe terminal title. And then executed it by setting a custom title first. In In PowerShell, running In all cases setting The NodeJS docs seem to interpret The UX here is definitely awkward, though I'm not convinced we're doing anything wrong. It seems to me that I see four distinct bugs which are potentially actionable to create the behavior you want.
Fundamentally, the problem here is that |
We discussed these findings in our team meeting and our consensus is that this is mostly a There is definitely a usability issue here, particularly around displaying |
More context about this can be found in the following comment: angular#19205 (comment) Closes angular#19205
More context about this can be found in the following comment: #19205 (comment) Closes #19205
More context about this can be found in the following comment: #19205 (comment) Closes #19205 (cherry picked from commit 7ababc2)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
More context about this can be found in the following comment: angular#19205 (comment) Closes angular#19205
🐞 Bug report
Command (mark with an
x
)Is this a regression?
No. As far as I can tell this would have been an issue for as long as Angular CLI has been using
process.title = 'something';
.Description
Node's
process.title
overwrites the entire window title in Windows Command Prompt, which is non-standard behaviour, and makes it very difficult to identify similar windows.Standard Windows Command Prompt behaviour is to show "{title} - {command}", and this works perfectly if I comment out or remove any reference to
process.title
, for instance inpackages/angular/cli/bin/ng
:🔬 Minimal Reproduction
cmd.exe
.title
command (e.g.title My Angular App
).ng
command (ng version
,ng build --watch
, etc...)ng
is running, the title of the window is completely replaced by whateverng
command was run.Technically, step 2 is not required to exhibit this bug. I mention it merely to demonstrate why I'm using it (as mentioned in the "Anything else" section below). It happens even with the default title when the window opens.
🌍 Your Environment
From
systeminfo
:From
ng version
:Anything else relevant?
I assume this only affects Windows. The current behaviour is extremely frustrating because I run multiple apps at the same time, each in a separate window, which I've named "Custom App 1", "Custom App 2", etc..., but once they all start running, each window is identically named "ng build --watch". It's really hard to observe them when I don't know which one is which.
The text was updated successfully, but these errors were encountered: