Browse Source

property environment=.. failed under JDK 1.2 with a NPE because WinNTCommandLauncher.exec() got a null working directory and a null Project - reported by <Aimee.Ukasick@med.ge.com>

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269505 13f79535-47bb-0310-9956-ffa450edef68
master
Nico Seessle 24 years ago
parent
commit
480e64cc18
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      src/main/org/apache/tools/ant/taskdefs/Execute.java

+ 6
- 2
src/main/org/apache/tools/ant/taskdefs/Execute.java View File

@@ -627,8 +627,12 @@ public class Execute {
public Process exec(Project project, String[] cmd, String[] env, File workingDir) throws IOException
{
File commandDir = workingDir;
if ( workingDir == null && project != null ) {
commandDir = project.getBaseDir();
if ( workingDir == null ) {
if ( project != null ) {
commandDir = project.getBaseDir();
} else {
return exec(project, cmd, env);
}
}

// Use cmd.exe to change to the specified directory before running


Loading…
Cancel
Save