Browse Source

Set exit code appropriately when build file missing or invalid.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267941 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 25 years ago
parent
commit
9ee88d11ca
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/main/org/apache/tools/ant/Main.java

+ 2
- 2
src/main/org/apache/tools/ant/Main.java View File

@@ -236,7 +236,7 @@ public class Main {


if (!buildFile.exists()) { if (!buildFile.exists()) {
System.out.println("Buildfile: " + buildFile + " does not exist!"); System.out.println("Buildfile: " + buildFile + " does not exist!");
return;
throw new BuildException("Build failed");
} }


// make sure it's not a directory (this falls into the ultra // make sure it's not a directory (this falls into the ultra
@@ -244,7 +244,7 @@ public class Main {


if (buildFile.isDirectory()) { if (buildFile.isDirectory()) {
System.out.println("What? Buildfile: " + buildFile + " is a dir!"); System.out.println("What? Buildfile: " + buildFile + " is a dir!");
return;
throw new BuildException("Build failed");
} }


readyToRun = true; readyToRun = true;


Loading…
Cancel
Save