Browse Source

Make NetCommand#setDirectory actually do something

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276768 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 21 years ago
parent
commit
74c147ed2a
2 changed files with 13 additions and 2 deletions
  1. +8
    -0
      src/main/org/apache/tools/ant/taskdefs/Execute.java
  2. +5
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java

+ 8
- 0
src/main/org/apache/tools/ant/taskdefs/Execute.java View File

@@ -382,6 +382,14 @@ public class Execute {
}
}

/**
* @since Ant 1.7
*/
public File getWorkingDirectory() {
return workingDirectory == null ? new File(antWorkingDirectory)
: workingDirectory;
}

/**
* Set the name of the antRun script using the project's value.
*


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

@@ -126,7 +126,6 @@ public class NetCommand {
this.program = program;
commandLine = new Commandline();
commandLine.setExecutable(program);
prepareExecutor();
}


@@ -207,7 +206,8 @@ public class NetCommand {
*
*@param argument1 The first argument
*@param argument2 The second argument
*/ public void addArgument(String argument1, String argument2) {
*/
public void addArgument(String argument1, String argument2) {
if (argument2 != null && argument2.length() != 0) {
commandLine.createArgument().setValue(argument1 + argument2);
}
@@ -277,13 +277,16 @@ public class NetCommand {
*/
public void runCommand()
throws BuildException {
prepareExecutor();
int err = -1;
// assume the worst
try {
if (traceCommandLine) {
owner.log("In directory " + executable.getWorkingDirectory());
owner.log(commandLine.describeCommand());
} else {
//in verbose mode we always log stuff
logVerbose("In directory " + executable.getWorkingDirectory());
logVerbose(commandLine.describeCommand());
}
setExecutableCommandLine();


Loading…
Cancel
Save