From 5aab21c61118e0254654924ffe6043d2d547b0bd Mon Sep 17 00:00:00 2001
From: cgeek <cem.moreau@gmail.com>
Date: Wed, 2 Dec 2015 21:11:23 +0100
Subject: [PATCH] Fix #243 add node & npm to the path during git installation

---
 install.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/install.sh b/install.sh
index 8b92809c4..163cf33cf 100644
--- a/install.sh
+++ b/install.sh
@@ -34,6 +34,9 @@ ucoin_download() {
 }
 
 install_ucoin_from_git() {
+
+  local PREVIOUS_PATH
+  PREVIOUS_PATH=$PATH
   if [ -d "$UCOIN_DIR/.git" ]; then
     echo "=> ucoin is already installed in $UCOIN_DIR, trying to update using git"
     printf "\r=> "
@@ -83,8 +86,9 @@ install_ucoin_from_git() {
   }
 
   # Install uCoin dependencies (NPM modules)
-  local NPM=$UCOIN_DIR/node/bin/npm
-  $NPM install
+  export PATH=$PATH:$UCOIN_DIR/node/bin/
+  npm install
+  export PATH=$PREVIOUS_PATH
   return
 }
 
-- 
GitLab