Skip to content
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

Mention of %COMSPEC% can lead Windows users to change the variable #3816

Closed
debashisbiswas opened this issue Jun 1, 2023 · 9 comments
Closed
Labels
docs Primarily or only affects documentation

Comments

@debashisbiswas
Copy link

What page or section of the docs have an issue?
https://wezfurlong.org/wezterm/config/launch.html

Describe the issue
On this page, the Windows setup page mentions that the shell will be determined by the value of the %COMSPEC% environment variable if it is set. This implies that one method of changing the shell is to change this variable. However, this is not recommended on Windows, as it seems to break many programs which assume the variable will be pointing to cmd.exe.

I had initially changed my %COMSPEC% variable to point to PowerShell, and it took me a while to figure out why some of my tools stopped working. I'd like to help other users avoid the same situation. Would it make sense to add a warning of some kind to the docs to make it clear that this variable is not meant to be changed? I see another user was confused by the same thing: #3317

@debashisbiswas debashisbiswas added the docs Primarily or only affects documentation label Jun 1, 2023
@ulyssesdotcodes
Copy link

I ran into this too. By changing COMSPEC, whenever pwsh runs a .cmd file (e.g. npm, but tons of others too) instead of just running the file with cmd, it starts pwsh to run cmd to run the file, which, instead of running cmd directly, runs pwsh, which.... etc.

This is a huge error in the documentation as it causes an issue that's not obvious and very difficult to track down.

@wez wez closed this as completed in 6c7aa81 Aug 20, 2023
@requizm
Copy link

requizm commented Aug 29, 2023

@ulyssesdotcodes I agree.

I run into the same issue. It should be mentioned in the documentation as a warning. Huge issue.

@wez
Copy link
Owner

wez commented Aug 29, 2023

This is how the docs have looked for the past week:

image

It's not going to get much better than this.

@requizm
Copy link

requizm commented Aug 29, 2023

@wez Thank you for the note. But..

Shouldn't we give a warning on the installation page? It is literally breaking PowerShell CMD execution. As a user, If I'm going to install wezterm, should I read the launch page? I thought it was enough to read the installation page for installing wezterm, without breaking PowerShell.

Let's think this way. I installed wezterm. I haven't used it much, but suddenly PowerShell broke. I suspected wezterm was doing something and deleted it but nothing changed. Upon further inspection, I found out(reddit actually) that it changed ComSpec.

@wez
Copy link
Owner

wez commented Aug 29, 2023

wezterm does not change comspec.
Can you share what steps you took to install wezterm?

@debashisbiswas
Copy link
Author

@requizm Weird, I didn't experience an issue where COMSPEC was changed for me, I changed it on my own because of how the docs were worded (which has already been fixed). If it was really changed for you, that sounds like a different + bigger issue than what I had posted

@wez
Copy link
Owner

wez commented Aug 29, 2023

To clarify: wezterm does not, has never and will never change COMSPEC. If it is changed on your system, something else did it.

@requizm
Copy link

requizm commented Aug 31, 2023

@wez That's interesting. Sorry for the misunderstanding. I installed it with choco. Nothing specific.

However, I couldn't find the infinity process problem anywhere else except this repo.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
docs Primarily or only affects documentation
Projects
None yet
Development

No branches or pull requests

4 participants