From 2862cddb6a03657e484eaeefc68b4646c7d86e93 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 6 Dec 2017 11:29:11 -0600 Subject: [PATCH] Source nvm before using it According to https://github.com/creationix/nvm#install-script, we should, you know, actually source the script rather than just cloning the repo and then ignoring it. Change-Id: I046af8d38cf7288fcb3fac74cd6839d4e006ca90 --- roles/upload-npm/tasks/main.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/upload-npm/tasks/main.yaml b/roles/upload-npm/tasks/main.yaml index 85c3dee31..8fa53f2d4 100644 --- a/roles/upload-npm/tasks/main.yaml +++ b/roles/upload-npm/tasks/main.yaml @@ -16,6 +16,8 @@ shell: executable: /bin/bash cmd: | + export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm nvm install node nvm use node npm publish --ignore-scripts {{ zuul.executor.work_root }}/artifacts/{{ zuul.project.short_name }}-{{ project_ver }}.tar.gz