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

devon.bat sets wrong user PATH in Windows system environment settings #1071

Closed
hohwille opened this issue Mar 14, 2023 · 1 comment · Fixed by #1072
Closed

devon.bat sets wrong user PATH in Windows system environment settings #1071

hohwille opened this issue Mar 14, 2023 · 1 comment · Fixed by #1072
Labels
bug Something isn't working scripts related to shell scripts (bash and CMD) setup related to the setup process of devonfw-ide (setup[.bat] and devon ... setup) windows specific for Microsoft Windows OS

Comments

@hohwille
Copy link
Member

I received feedback that people have been facing #954 again with latest release (2023.03.001).
After digging into devon.bat I discovered at least one part about setting the user PATH that IMHO was wrong from the start:

setx PATH "%%USERPROFILE%%\scripts;"

If the user PATH is actually empty for reason, then windows behaves such that it sets the PATH to the system PATH.
So if we run into this IF statement on proper purpose, we have to set PATH to %PATH%;%%USERPROFILE%%\scripts instead.
That is already one bug.

Another question is if #954 was never entirely fixed, is now back due to #1067, or whatever leads to the problem that a user PATH is set but gets lost after calling setup.bat or devon.bat.

@hohwille hohwille added bug Something isn't working windows specific for Microsoft Windows OS scripts related to shell scripts (bash and CMD) setup related to the setup process of devonfw-ide (setup[.bat] and devon ... setup) labels Mar 14, 2023
@hohwille hohwille added this to the release:2023.03.002 milestone Mar 14, 2023
@hohwille
Copy link
Member Author

With PR #1072 I fix the first thing.
Further I added according output that we can now easily trace down the second thing.
If someone can reproduce the second problem earlier we can create a fix immediately but otherwise I would already release the current state to make progress and finally get this ugly windows CMD *.bat scripts stable again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working scripts related to shell scripts (bash and CMD) setup related to the setup process of devonfw-ide (setup[.bat] and devon ... setup) windows specific for Microsoft Windows OS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant