Browse Source

Made sure OS version is parsed correctly for OSX

Submitted By: Archit Shah <ashah@arsdigita.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268955 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
00f96abeb0
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      src/main/org/apache/tools/ant/taskdefs/Execute.java

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

@@ -200,8 +200,11 @@ public class Execute {
// 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;


Loading…
Cancel
Save