From 82ee6de3c95c68d576e3136cabb4082af50049d0 Mon Sep 17 00:00:00 2001 From: Kevin Jackson Date: Mon, 29 May 2006 03:05:26 +0000 Subject: [PATCH] remove deprecated code git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@410015 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/Execute.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Execute.java b/src/main/org/apache/tools/ant/taskdefs/Execute.java index 538920670..f92c3e2ad 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Execute.java +++ b/src/main/org/apache/tools/ant/taskdefs/Execute.java @@ -38,6 +38,7 @@ import org.apache.tools.ant.Task; import org.apache.tools.ant.taskdefs.condition.Os; import org.apache.tools.ant.types.Commandline; import org.apache.tools.ant.util.FileUtils; +import org.apache.tools.ant.util.StringUtils; /** * Runs an external program. @@ -169,7 +170,7 @@ public class Execute { return procEnvironment; } String var = null; - String line, lineSep = System.getProperty("line.separator"); + String line, lineSep = StringUtils.LINE_SEP; while ((line = in.readLine()) != null) { if (line.indexOf('=') == -1) { // Chunk part of previous env var (UNIX env vars can @@ -1020,8 +1021,9 @@ public class Execute { throw new IOException("Cannot locate antRun script: " + "Property '" + MagicNames.ANT_HOME + "' not found"); } - String antRun = project.resolveFile(antHome + File.separator - + myScript).toString(); + String antRun = + FILE_UTILS.resolveFile(project.getBaseDir(), + antHome + File.separator + myScript).toString(); // Build the command File commandDir = workingDir; @@ -1078,8 +1080,9 @@ public class Execute { throw new IOException("Cannot locate antRun script: " + "Property '" + MagicNames.ANT_HOME + "' not found"); } - String antRun = project.resolveFile(antHome + File.separator - + myScript).toString(); + String antRun = + FILE_UTILS.resolveFile(project.getBaseDir(), + antHome + File.separator + myScript).toString(); // Build the command File commandDir = workingDir;