| Using Exec within my own Task, divert stdout to null? | Using Exec within my own Task, divert stdout to null? 2003-02-07 - By David McTavish
Is there a way that I can divert the standard output of an exec task used within my own custom task to /dev/null? (Without setting this as a command-line argument?)
ExecTask exec = createExec(); if (runtimeDir != null) { Environment.Variable var = new Environment.Variable(); var.setKey("PATH"); var.setPath(runtimeDir); exec.addEnv(var); } exec.setFailonerror(true); exec.setDir(baseDir); exec.setExecutable("myexec.exe"); exec.createArg().setValue("/i"); exec.createArg().setValue(initString); exec.execute();
Also, any ideas on how to "correct" the environment variable above (PATH), such that it works on both cygwin and Windows. It seems that when run on Windows, it wants to use C:\folder\folder connotation, instead of /c/folder/folder. Any insight would be appreciated.
thx, d.
|
|
 |