ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Execute.java
Date Sat, 21 Apr 2001 02:20:37 GMT
donaldp     01/04/20 19:20:37

  Modified:    src/main/org/apache/tools/ant/taskdefs Execute.java
  Log:
  Made sure OS version is parsed correctly for OSX
  
  Submitted By: Archit Shah <ashah@arsdigita.com>
  
  Revision  Changes    Path
  1.17      +5 -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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Execute.java	2001/04/14 07:25:14	1.16
  +++ Execute.java	2001/04/21 02:20:36	1.17
  @@ -200,8 +200,11 @@
               // Mac
               // Determine if we are running under OS X
               try {
  -                float version = Float.parseFloat(System.getProperty("os.version"));
  -                if (version >= 10.0) {
  +                String version = System.getProperty("os.version");
  +                int majorVersion = 
  +                    Integer.parseInt(version.substring(0, version.indexOf('.')));
  +
  +                if (majorVersion >= 10) {
                       // OS X - just line UNIX
                       String[] cmd = {"/usr/bin/env"};
                       return cmd;
  
  
  

Mime
View raw message