From b35d9586dbb35d79f83d066153ae460b25dc82d4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Sat, 27 Jan 2018 14:35:29 -0500 Subject: Too much vodka. --- src/edu/stsci/CondaInstaller.groovy | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/edu/stsci/CondaInstaller.groovy b/src/edu/stsci/CondaInstaller.groovy index 9be4a70..27f1b06 100644 --- a/src/edu/stsci/CondaInstaller.groovy +++ b/src/edu/stsci/CondaInstaller.groovy @@ -30,13 +30,17 @@ class CondaInstaller implements Serializable { this.url = "${this.dist.baseurl}/" + this.installer } - void download() { + int download() { println("${this.ident} Downloading $url") - def cmd = "curl -qL ${this.url}" - def proc = cmd.execute() + def proc = ["bash", "-c", "curl -sLO ${this.url}"].execute() + def out = new StringBuffer() + def err = new StringBuffer() + proc.consumeProcessOutput(out, err) proc.waitFor() - // Whatever Jenkins... + if (out.size() > 0) println(out) + if (err.size() > 0) println(err) + // Whatever Jenkins... Why is this so hard? /* File fp = new File(this.installer) def body = fp.newOutputStream() -- cgit