ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Execute.java
Date Sat, 17 Feb 2001 11:45:49 GMT
conor       01/02/17 03:45:48

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_13_BRANCH
                        Execute.java
  Log:
  Fix up the environment mode of the property task. The recently added logging
  assumed the project object of Execute is always setup which is not the case,
  particularly for the <property> task environment mode.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.12.2.3  +12 -6     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.12.2.2
  retrieving revision 1.12.2.3
  diff -u -r1.12.2.2 -r1.12.2.3
  --- Execute.java	2001/02/14 13:20:18	1.12.2.2
  +++ Execute.java	2001/02/17 11:45:45	1.12.2.3
  @@ -428,8 +428,10 @@
            */
           public Process exec(Project project, String[] cmd, String[] env) throws IOException
           {
  -            project.log("Execute:CommandLauncher: " +
  -                        Commandline.toString(cmd), Project.MSG_DEBUG);
  +            if (project != null) {
  +                project.log("Execute:CommandLauncher: " +
  +                            Commandline.toString(cmd), Project.MSG_DEBUG);
  +            }                            
               return Runtime.getRuntime().exec(cmd, env);
           }
   
  @@ -471,8 +473,10 @@
               for ( int i = 0; i < cmd.length; i++ ) {
                   newcmd[i] = Commandline.quoteArgument(cmd[i]);
               }
  -            project.log("Execute:Java11CommandLauncher: " +
  -                        Commandline.toString(newcmd), Project.MSG_DEBUG);
  +            if (project != null) {
  +                project.log("Execute:Java11CommandLauncher: " +
  +                            Commandline.toString(newcmd), Project.MSG_DEBUG);
  +            }                            
               return Runtime.getRuntime().exec(newcmd, env);
           }
       }
  @@ -497,8 +501,10 @@
               throws IOException
           {
               try {
  -                project.log("Execute:Java13CommandLauncher: " +
  -                            Commandline.toString(cmd), Project.MSG_DEBUG);
  +                if (project != null) {
  +                    project.log("Execute:Java13CommandLauncher: " +
  +                                Commandline.toString(cmd), Project.MSG_DEBUG);
  +                }                                
                   Object[] arguments = { cmd, env, workingDir };
                   return (Process)_execWithCWD.invoke(Runtime.getRuntime(), arguments);
               } 
  
  
  

Mime
View raw message