Permalink
Browse files

[MNG-3757] avoid deleting M2_HOME if it is empty

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@727671 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent e0cdbdc commit 385888d545ba9c3f8fda9f0a0804790176a85926 @brettporter brettporter committed Dec 18, 2008
Showing with 10 additions and 1 deletion.
  1. +10 −1 build.xml
View
@@ -44,7 +44,16 @@ END SNIPPET: ant-bootstrap -->
<condition property="maven.home" value="${env.M2_HOME}">
<isset property="env.M2_HOME"/>
</condition>
- <fail unless="maven.home" message="You must set the M2_HOME environment variable or specify a maven.home property to this Ant script"/>
+ <fail message="You must set the M2_HOME environment variable or specify a maven.home property to this Ant script">
+ <condition>
+ <or>
+ <not>
+ <isset property="maven.home" />
+ </not>
+ <equals arg1="${maven.home}" arg2="" trim="true" />
+ </or>
+ </condition>
+ </fail>
</target>
<target name="init" depends="isMavenHomeSet">

0 comments on commit 385888d

Please sign in to comment.