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() {
609609 */
610610 default Path getMavenConfigurationFolder () {
611611
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 )) {
616617 Path m2LegacyFolder = confPath .resolve (Mvn .MVN_CONFIG_LEGACY_FOLDER );
617618 if (Files .isDirectory (m2LegacyFolder )) {
618- m2Folder = m2LegacyFolder ;
619+ mvnConfFolder = m2LegacyFolder ;
619620 } else {
620- // fallback to USER_HOME/.m2 folder
621- m2Folder = getUserHome ().resolve (Mvn .MVN_CONFIG_LEGACY_FOLDER );
621+ mvnConfFolder = null ; // see fallback below
622622 }
623623 }
624- return m2Folder ;
625624 }
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 ;
627630 }
628631
629632 /**
You can’t perform that action at this time.
0 commit comments