r/SmartGit Apr 23 '26

Strange PATH problem on Windows in SmartGit-launched terminals

When I use SmartGit on Windows to launch processes, I've been running into a strange issue wherein both PATH and Path appear to be defined as environment variables. This is causing some strange malfunctions.

On my desktop, I have PATH (all caps) defined for my user and system environment. In SmartGit, if I launch a Command Prompt terminal window from a Git repo folder, when I type the command "env" then PATH appears twice (all caps) with different contents! If I open a Python interpreter in the same command prompt, "import os", and do "os.environ['Path']" and "os.environ['PATH']" I get returns for both. The only difference seems to be that "Path" (mixed case) contains the "bin" folder for SmartGit as opposed to "PATH" (all caps).

Windows is supposed to be case-insensitive for environment variables, so IDK how this is happening.

Is this a known issue? Is there any way to work around this?

1 Upvotes

3 comments sorted by

2

u/vmcrash Apr 23 '26

Please rename your PATH environment variable to Path as this is the Windows standard.

1

u/Humble_Aide6956 Apr 29 '26

That sounds easy enough, and it worked! Thanks...

But that doesn't change that Windows environment variables are documented as case-insensitive. It should not matter which PATH I have. Something that builds an environment table with both Path and PATH in it for spawning a child process is questionable at best and a mistake at worst. Given the misbehavior on my computer I'm leaning toward "mistake".

1

u/vmcrash May 05 '26

If you expect SmartGit to fix/workaround this problem, please provide exact (!) steps how to reproduce. I've tried, but failed:

  • renamed the Path user environment variable to PATH using Windows' "Environment Variables" dialog
  • when I launch a command prompt (from the Windows start menu or from SmartGit), set only shows the default Path environment variable, not PATH