From 0cf704143c0c5e865b8eda4ca9d8b82216596ce8 Mon Sep 17 00:00:00 2001 From: Matt Kwong Date: Tue, 19 Sep 2017 16:06:20 -0700 Subject: [PATCH] Allow npm install without root --- packages/grpc-health-check/gulpfile.js | 2 +- packages/grpc-js-core/gulpfile.js | 2 +- packages/grpc-native-core/gulpfile.js | 2 +- run-tests.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/grpc-health-check/gulpfile.js b/packages/grpc-health-check/gulpfile.js index e66ec72a..72f9e515 100644 --- a/packages/grpc-health-check/gulpfile.js +++ b/packages/grpc-health-check/gulpfile.js @@ -11,7 +11,7 @@ const baseDir = path.resolve(healthCheckDir, '..', '..'); const testDir = path.resolve(healthCheckDir, 'test'); gulp.task('health-check.install', 'Install health check dependencies', () => { - return execa('npm', ['install'], {cwd: healthCheckDir, stdio: 'inherit'}); + return execa('npm', ['install', '--unsafe-perm'], {cwd: healthCheckDir, stdio: 'inherit'}); }); gulp.task('health-check.link.add', 'Link local copy of grpc', ['health-check.install'], () => { diff --git a/packages/grpc-js-core/gulpfile.js b/packages/grpc-js-core/gulpfile.js index c8b8f70f..588dabdc 100644 --- a/packages/grpc-js-core/gulpfile.js +++ b/packages/grpc-js-core/gulpfile.js @@ -81,7 +81,7 @@ function makeCompileFn(globs) { } gulp.task('js.core.install', 'Install native core dependencies', () => { - return execa('npm', ['install'], {cwd: jsCoreDir, stdio: 'inherit'}); + return execa('npm', ['install', '--unsafe-perm'], {cwd: jsCoreDir, stdio: 'inherit'}); }); /** diff --git a/packages/grpc-native-core/gulpfile.js b/packages/grpc-native-core/gulpfile.js index 00b1ffd8..c4c28e7c 100644 --- a/packages/grpc-native-core/gulpfile.js +++ b/packages/grpc-native-core/gulpfile.js @@ -17,7 +17,7 @@ const pkg = require('./package'); const jshintConfig = pkg.jshintConfig; gulp.task('native.core.install', 'Install native core dependencies', () => { - return execa('npm', ['install', '--build-from-source'], + return execa('npm', ['install', '--build-from-source', '--unsafe-perm'], {cwd: nativeCoreDir, stdio: 'inherit'}); }); diff --git a/run-tests.sh b/run-tests.sh index 530a5231..65dc5323 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -42,7 +42,7 @@ do set -ex # Install dependencies and link packages together. - npm install + npm install --unsafe-perm ./node_modules/.bin/gulp setup # Rebuild libraries and run tests.