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

Windows Environment is not right #6246

Open
2 of 3 tasks
loongee opened this issue Apr 3, 2025 · 7 comments
Open
2 of 3 tasks

Windows Environment is not right #6246

loongee opened this issue Apr 3, 2025 · 7 comments
Labels
Bugs Bugs, Hangs, Crash, and Freezes

Comments

@loongee
Copy link

loongee commented Apr 3, 2025

Pre-submit Checks

Describe the bug

The program under %PATH% may not be found if the path contains macros like %USERPROFILE%

To reproduce

  1. Add a path contains macro to %PATH%, such as GO's path: %USERPROFILE%\go\bin
  2. Change directory to any directory other than go\bin, Run any exe under the %USERPROFILE%\go\bin
  3. Error occurred: The term 'xxx.exe' is not recognized as a name of a cmdlet, function, script file, or executable program.
    Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Expected behavior

Let me run the exe under the %PATH% directories, without typing the full path.

Screenshots, videos, and logs

Under Warp, when you type:
$Env:Path
it will return:
%USERPROFILE%\go\bin

Under Windows Terminal, type the same command, it will return:
C:\Users\xxx\go\bin

That's the difference

Operating system (OS)

Windows

Operating system and version

Windows 11 24H2

Shell Version

Powershell 7.5.0

Current Warp version

v0.2025.03.26.08.10.stable_02

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

Is this an issue only in Warp?

Yes, I confirmed that this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

@loongee loongee added the Bugs Bugs, Hangs, Crash, and Freezes label Apr 3, 2025
@acarl005
Copy link

acarl005 commented Apr 3, 2025

Add a path contains macro to %PATH%, such as GO's path: %USERPROFILE%\go\bin

How did you do this? In Control Panel? In your shell profile file? In the middle of a running session?

@loongee
Copy link
Author

loongee commented Apr 5, 2025

Add a path contains macro to %PATH%, such as GO's path: %USERPROFILE%\go\bin

How did you do this? In Control Panel? In your shell profile file? In the middle of a running session?

Just install the GO lang, the installer will set it for you. In the Control Panel you can do it manually.

@acarl005
Copy link

acarl005 commented Apr 8, 2025

How did the GO installer do it? Did it add it to %PATH% by editing your shell profile file or did it add it to the registry?

If you restart Warp does the issue persist?

@loongee
Copy link
Author

loongee commented Apr 9, 2025

Yes, it add an entry "USERPROFILE%\go\bin under Path of my personal environment.
Restart Warp didn't help. The entries of Path which contains variable such as %USERPROFILE% are not expanded to the real path. Compares to Windows Terminal, which expand the variables for entries under Path, I think that's the difference cause command in Warp cannot find the proper target

@acarl005
Copy link

acarl005 commented Apr 9, 2025

I presume you have many entries in your %PATH% containing macros. Is %USERPROFILE%\go\bin the only one failing to expand?

@loongee
Copy link
Author

loongee commented Apr 11, 2025

I presume you have many entries in your %PATH% containing macros. Is %USERPROFILE%\go\bin the only one failing to expand?

No, i have many entries like %NVM_HOME%, %JAVA_HOME%, %USERPROFILE%... no environment variable is expanded, it just keep the original string.

@acarl005
Copy link

acarl005 commented Apr 11, 2025

It's weird because you are the only one having this issue with macro expansion so far (who has reported it).

Can you provide the following?

  1. The output of the command Get-ItemProperty -Path 'HKCU:\Environment' -Name PATH from any terminal.
  2. The output of the command Get-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH from any terminal.
  3. The output of $env:PATH from Warp.
  4. The output of $env:PATH from a different terminal.
  5. A screenshot of System Information > Environment variables > PATH, for example...

Image

If you prefer not to post this information publicly on Github, please email to [email protected] and include a link to this issue. Thank you!

@acarl005 acarl005 reopened this Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugs Bugs, Hangs, Crash, and Freezes
Projects
None yet
Development

No branches or pull requests

2 participants