File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
cli/src/main/java/com/devonfw/tools/ide/context Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -609,21 +609,24 @@ default String getMavenArgs() {
609
609
*/
610
610
default Path getMavenConfigurationFolder () {
611
611
612
- if (getIdeHome () != null ) {
613
- Path confPath = getConfPath ();
614
- Path m2Folder = confPath .resolve (Mvn .MVN_CONFIG_FOLDER );
615
- if (!Files .isDirectory (m2Folder )) {
612
+ Path confPath = getConfPath ();
613
+ Path mvnConfFolder = null ;
614
+ if (confPath != null ) {
615
+ mvnConfFolder = confPath .resolve (Mvn .MVN_CONFIG_FOLDER );
616
+ if (!Files .isDirectory (mvnConfFolder )) {
616
617
Path m2LegacyFolder = confPath .resolve (Mvn .MVN_CONFIG_LEGACY_FOLDER );
617
618
if (Files .isDirectory (m2LegacyFolder )) {
618
- m2Folder = m2LegacyFolder ;
619
+ mvnConfFolder = m2LegacyFolder ;
619
620
} else {
620
- // fallback to USER_HOME/.m2 folder
621
- m2Folder = getUserHome ().resolve (Mvn .MVN_CONFIG_LEGACY_FOLDER );
621
+ mvnConfFolder = null ; // see fallback below
622
622
}
623
623
}
624
- return m2Folder ;
625
624
}
626
- return null ;
625
+ if (mvnConfFolder == null ) {
626
+ // fallback to USER_HOME/.m2 folder
627
+ mvnConfFolder = getUserHome ().resolve (Mvn .MVN_CONFIG_LEGACY_FOLDER );
628
+ }
629
+ return mvnConfFolder ;
627
630
}
628
631
629
632
/**
You can’t perform that action at this time.
0 commit comments