mirror of https://github.com/apache/maven.git
[MNG-6001] Replace %HOME% with %USERPROFILE% in mvn.cmd
This commit is contained in:
parent
1bc69ff93e
commit
d426bf9c6e
|
@ -32,14 +32,11 @@
|
||||||
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
|
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
|
||||||
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||||
|
|
||||||
@REM set %HOME% to equivalent of $HOME
|
|
||||||
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
|
||||||
|
|
||||||
@REM Execute a user defined script before this one
|
@REM Execute a user defined script before this one
|
||||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||||
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||||
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
|
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat"
|
||||||
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
|
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd"
|
||||||
:skipRcPre
|
:skipRcPre
|
||||||
|
|
||||||
@setlocal
|
@setlocal
|
||||||
|
@ -143,8 +140,8 @@ set ERROR_CODE=1
|
||||||
|
|
||||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
|
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
|
||||||
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||||
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
|
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
|
||||||
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
|
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
|
||||||
:skipRcPost
|
:skipRcPost
|
||||||
|
|
||||||
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||||
|
|
Loading…
Reference in New Issue