aboutsummaryrefslogtreecommitdiff
path: root/vars
diff options
context:
space:
mode:
authorMatt Rendina <rendinam@users.noreply.github.com>2019-05-10 14:00:37 -0400
committerGitHub <noreply@github.com>2019-05-10 14:00:37 -0400
commit27aa04e653014888fa203204150eefc4bc804804 (patch)
tree3075df41299c7bf7081405bc11b3a0ab0cf33850 /vars
parent61fdd601b48119d4e18329dd3d2c290f69ef2850 (diff)
downloadjscu_refactor-27aa04e653014888fa203204150eefc4bc804804.tar.gz
Quote filenames passed to sed for robustness (#49)
* Test env dump on CI system * Quote filenames in sed calls to accommodate spaces * Quote dump_name for robustness. * Correct jenkinsfile
Diffstat (limited to 'vars')
-rw-r--r--vars/utils.groovy8
1 files changed, 4 insertions, 4 deletions
diff --git a/vars/utils.groovy b/vars/utils.groovy
index b38d362..1676841 100644
--- a/vars/utils.groovy
+++ b/vars/utils.groovy
@@ -513,15 +513,15 @@ def buildAndTest(config) {
commit = sh(script: "git rev-parse HEAD", returnStdout: true).trim()
// Remove 'prefix' line as it isn't needed and complicates the
// addition of the 'pip' section.
- sh(script: "sed -i '/prefix/d' ${dump_name}")
- pip_section = sh(script: "grep 'pip:' ${dump_name}", returnStatus: true)
+ sh(script: "sed -i '/prefix/d' '${dump_name}'")
+ pip_section = sh(script: "grep 'pip:' '${dump_name}'", returnStatus: true)
if (pip_section != 0) {
- sh "echo ' - pip:' >> ${dump_name}"
+ sh "echo ' - pip:' >> '${dump_name}'"
}
// Add git+https line in pip section to install the commit
// used for the target project of this job.
extra_yml_1 = " - ${remote_repo}@${commit}"
- sh "echo '${extra_yml_1}' >> ${dump_name}"
+ sh "echo '${extra_yml_1}' >> '${dump_name}'"
// Stash spec file for use on master node.
stash includes: '**/conda_env_dump*',