summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/spigotmc/builder/Builder.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/spigotmc/builder/Builder.java b/src/main/java/org/spigotmc/builder/Builder.java
index 810cf3c..0549cd8 100644
--- a/src/main/java/org/spigotmc/builder/Builder.java
+++ b/src/main/java/org/spigotmc/builder/Builder.java
@@ -171,8 +171,9 @@ public class Builder
clone( "https://hub.spigotmc.org/stash/scm/spigot/builddata.git", buildData );
}
- File maven = new File( System.getenv( "M2_HOME" ) );
- if ( !maven.exists() )
+ File maven;
+ String m2Home = System.getenv( "M2_HOME" );
+ if ( m2Home == null || !(maven = new File(m2Home)).exists() )
{
maven = new File( "apache-maven-3.2.5" );