Browse Source

Try permissions option

Bob Mottram 7 years ago
parent
commit
a67fc56d8c
1 changed files with 4 additions and 6 deletions
  1. 4
    6
      src/freedombone-app-scuttlebot

+ 4
- 6
src/freedombone-app-scuttlebot View File

@@ -402,16 +402,14 @@ function mesh_install_scuttlebot {
402 402
 
403 403
     cat <<EOF > "$rootdir/usr/bin/install_scuttlebot"
404 404
 #!/bin/bash
405
-chown -R $(whoami):$(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
406
-chown -R $(whoami):$(whoami) ~/.npm
407
-if ! npm install --arch=$NPM_ARCH -g scuttlebot@${SCUTTLEBOT_VERSION}; then
408
-    exit 2
405
+if ! npm install --unsafe-perm --verbose --arch=$NPM_ARCH -g scuttlebot@${SCUTTLEBOT_VERSION}; then
406
+    exit 1
409 407
 fi
410 408
 if ! npm install --arch=$NPM_ARCH -g git-ssb; then
411
-    exit 3
409
+    exit 2
412 410
 fi
413 411
 if ! npm install --arch=$NPM_ARCH -g git-remote-ssb; then
414
-    exit 4
412
+    exit 3
415 413
 fi
416 414
 EOF
417 415
     chroot "$rootdir" /bin/chmod +x /usr/bin/install_scuttlebot