From 7950bbb42f58b849180efad40882479992b4aa67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Hohwiller?= Date: Tue, 14 Mar 2023 15:12:43 +0100 Subject: [PATCH] #1071: improved/fixed devon.bat setx PATH for empty user path (#1072) --- scripts/src/main/resources/scripts/devon.bat | 21 ++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/scripts/src/main/resources/scripts/devon.bat b/scripts/src/main/resources/scripts/devon.bat index 999dccec9..79d29ddb5 100644 --- a/scripts/src/main/resources/scripts/devon.bat +++ b/scripts/src/main/resources/scripts/devon.bat @@ -131,16 +131,21 @@ goto :eof rem subroutine to set user path - fix for https://github.com/devonfw/ide/issues/1066 :set_userpath +echo USER_PATH=%USER_PATH% if "%USER_PATH:~-1,1%" == ";" ( set "USER_PATH=%USER_PATH:~0,-1%" ) if "%USER_PATH%" == "" ( - setx PATH "%%USERPROFILE%%\scripts;" - echo %_fBYellow%"ATTENTION:"%_RESET% - echo "Your user PATH environment variable has not been previously set." - echo "You may need to log-off and log-in again so your PATH changes are properly applied." - echo "Otherwise you may get errors that devon command has not been found." + echo %_fBYellow%ATTENTION: + echo Your user specific PATH variable seems to be empty. + echo You can double check this by pressing [Windows][r] and launch the programm SystemPropertiesAdvanced. + echo Then click on 'Environment variables' and check if 'PATH' is set in in the 'user variables' from the upper list. + echo In case 'PATH' is defined there non-empty and you get this message, please abort and give us feedback via the following bug issue: + echo https://github.com/devonfw/ide/issues/1071 + echo Otherwise all is correct and you can continue by pressing enter. + echo %_RESET% pause + setx PATH "%%PATH%%;%%USERPROFILE%%\scripts" ) else ( setx PATH "%USER_PATH%;%%USERPROFILE%%\scripts" ) @@ -149,9 +154,9 @@ if "%PATH:~-1,1%" == ";" ( ) else ( set "PATH=%PATH%;%USERPROFILE%\scripts" ) -echo %_fBGreen%The devon CLI script has been installed to your windows system.%_RESET% -echo %_fBGreen%Now in any new command shell, you can call devon to setup your IDE enviromennt variables.%_RESET% -echo %_fBGreen%You can also provide arguments to devon for advanced usage, e.g. try calling 'devon help'%_RESET% +echo %_fBGreen%The devon CLI script has been installed to your windows system. +echo Now in any new command shell, you can call devon to setup your IDE enviromennt variables. +echo You can also provide arguments to devon for advanced usage, e.g. try calling 'devon help'%_RESET% goto :eof rem subroutine to print version