From 70f1e64afa8f80a2523662d7b33ab934838d7ac4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 5 Jul 2017 14:14:23 -0400 Subject: jenkinsify --- src/org/stsci/Conda.groovy | 2 +- src/org/stsci/CondaInstaller.groovy | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/org/stsci/Conda.groovy b/src/org/stsci/Conda.groovy index d0736e0..8e306ed 100644 --- a/src/org/stsci/Conda.groovy +++ b/src/org/stsci/Conda.groovy @@ -10,7 +10,7 @@ class Conda implements Serializable { Conda (prefix) { this.prefix = prefix - this.prefix_exists = new File(this.prefix).exists() + this.prefix_exists = fileExists this.prefix this.shell_environment = [:] this.environment_name = "" this.channels = [] diff --git a/src/org/stsci/CondaInstaller.groovy b/src/org/stsci/CondaInstaller.groovy index 50f7f50..e65a2e1 100644 --- a/src/org/stsci/CondaInstaller.groovy +++ b/src/org/stsci/CondaInstaller.groovy @@ -37,12 +37,12 @@ class CondaInstaller implements Serializable { } int install() { - if (new File(this.prefix).exists()) { + if (fileExists this.prefix)) { println("Skipping installation: ${this.prefix} exists.") return 0xFF } - if (!new File('installer.sh').exists()) { + if (!fileExists 'installer.sh') { this.download() } -- cgit