aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonan Amicel <ronan.amicel@gmail.com>2012-10-13 15:17:01 +0200
committerRonan Amicel <ronan.amicel@gmail.com>2012-10-13 17:01:49 +0200
commit0f2940ad58a14c0c192ae1f1c0c1e5c118780380 (patch)
treee08f494da1b74cd6c899b4f6a0e6c2a790c79385
parentRefactor to use the same parameter name for local operations (diff)
downloadfabtools-0f2940ad58a14c0c192ae1f1c0c1e5c118780380.tar.xz
Fix npm lock permission issue
-rw-r--r--fabtools/nodejs.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/fabtools/nodejs.py b/fabtools/nodejs.py
index 8039f0f..63535d1 100644
--- a/fabtools/nodejs.py
+++ b/fabtools/nodejs.py
@@ -75,7 +75,7 @@ def install(package=None, version=None, local=False):
if local:
run('npm install -l %s' % package)
else:
- sudo('npm install -g %s' % package)
+ sudo('HOME=/root npm install -g %s' % package)
else:
run('npm install')
@@ -89,7 +89,7 @@ def update(package, local=False):
if local:
run('npm update -l %s' % package)
else:
- sudo('npm update -g %s' % package)
+ sudo('HOME=/root npm update -g %s' % package)
def uninstall(package, version=None, local=False):
@@ -115,4 +115,4 @@ def uninstall(package, version=None, local=False):
if local:
run('npm uninstall -l %s' % package)
else:
- sudo('npm uninstall -g %s' % package)
+ sudo('HOME=/root npm uninstall -g %s' % package)