ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Execute.java
Date Tue, 07 Aug 2001 22:11:52 GMT
nico        01/08/07 15:11:52

  Modified:    src/main/org/apache/tools/ant/taskdefs Execute.java
  Log:
  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>
  
  Revision  Changes    Path
  1.21      +6 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java
  
  Index: Execute.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Execute.java	2001/08/02 16:15:23	1.20
  +++ Execute.java	2001/08/07 22:11:52	1.21
  @@ -627,8 +627,12 @@
           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
  
  
  

Mime
View raw message