task writeOutputToFile << { new FileOutputStream(new File("$outdir/$outfile")).withStream { os ->
def res = exec {
executable = "/bin/echo"
args = ["param1","param2"]
standardOutput = os
}
}
}
I was initially using Process to write, but groovy has a bug where the main process exits when it finishes, causing the thread to exit before it finishes writing (using a FileWriter).
No comments:
Post a Comment