Comments (1)
Nice catch!
From what I see, there are a few possible workarounds:
- Edit that env var in the registry (
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
) but that doesn't broadcastWM_SETTINGCHANGE
to other processes so they can grab he new value. I see some ideas like usingsetx
right after that to set a variable to its own value. - Write a native Node module that uses
System.Environment.SetEnvironmentVariable
and use that instead ofsetx
. - Use a PowerShell script to do this job with
[Environment]::SetEnvironmentVariable('PATH', "$newPath",'Machine');
- Detect when the resulting
PATH
is longer than 1024 and don't do anything in that case (other than somehow surface that problem to the user).
With registryjs (1) should be pretty simple, although I can't tell how reliable that hacky use of setx
right afterwards is. (3) also sounds simple but not sure if there could be other potential issues with the use of external scripts.
from desktop.
Related Issues (20)
- Eliminated repository keeps coming back HOT 1
- it will not push HOT 1
- Writing to the locked network drive HOT 3
- %ProgramData%\Microsoft\Windows\UUS\State\_active.uusver is suddenly showing up as change in my repo HOT 3
- "Commit To Main" button not active? HOT 2
- This diff contains a change in line endings from 'LF' to 'CRLF'. HOT 20
- GitHub Desktop not updating and still thinks it's the latest version HOT 2
- Can't pull changes though UI can fetch remote commit gap HOT 5
- login problem HOT 2
- Setting a Git version 2.44 config pack.allowPackReuse to multi causes GitHub Desktop pushes to error HOT 4
- Assembly : Using transform tool unset the active Assembly HOT 1
- Can bundled Git binary be used in place of system Git (as Apple Git upgrade)? HOT 3
- "Open in Visual Studio Button" not working HOT 3
- The top warning in diff(right) panel will lead to not showing bottom lines HOT 1
- Push challenges HOT 2
- GitHub Desktop ignore global .gitignore HOT 2
- Failed authenticatiom HOT 3
- All branches not showing on dropdown HOT 3
- issue cloning repository HOT 2
- Kurnia Yuprianto Nazara
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from desktop.