From a12a35e8fc3742aa19f31d66e5cef15f823ba834 Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Tue, 18 Apr 2017 14:01:07 -0400 Subject: Use tokenize to avoid needing regex syntax --- jenkins/dispatch.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy index 3c2080a..227d1fd 100644 --- a/jenkins/dispatch.groovy +++ b/jenkins/dispatch.groovy @@ -60,7 +60,7 @@ node(LABEL) { println("PY_VERSION = ${PY_VERSION}") assert PY_VERSION != null assert PY_VERSION != "py_version-DEFAULTVALUE" - this.py_maj_version = "${PY_VERSION.split(".")[0]}" + this.py_maj_version = "${PY_VERSION.tokenize(".")[0]}" // Inherited from env() assignment performed in the generator // DSL script. @@ -80,7 +80,7 @@ node(LABEL) { def dl_cmd = null def stat1 = 999 for (cmd in dl_cmds) { - stat1 = sh(script: "which ${cmd.split()[0]}", returnStatus: true) + stat1 = sh(script: "which ${cmd.tokenize()[0]}", returnStatus: true) if( stat1 == 0 ) { dl_cmd = cmd break -- cgit