Forum Discussion
aaronpliu
Frequent Contributor
sam2009 most likely error is your command line. you can paste your command line here if no concern or you can try a simple command to try. for example: def cmd = "ls -la".execute()
// Here is an example (on windows) to call command (or shell)
// you can check it with zsh / bash command on your Mac
try {
def cmd = "cmd /c cd /d \"${toolDir}\" & tool.exe \"${outputDir}\" \"${logDir}\" "
log.info(cmd)
def output = cmd.execute()
def out = new StringBuffer()
def err = new StringBuffer()
output.waitForProcessOutput(out, err)
if (output.exitValue()) {
log.error(err)
} else {
log.info(out)
}
} catch(Exception e) {
testRunner.fail("Cancelled!!! => $e")
}
Thanks,
/Aaron
Related Content
Recent Discussions
- 22 days ago