ownership of npm

This commit is contained in:
Bob Mottram 2018-04-12 21:27:29 +01:00
parent b3f4ebe2ae
commit 1f6546d464
1 changed files with 2 additions and 0 deletions

View File

@ -402,6 +402,8 @@ function mesh_install_scuttlebot {
cat <<EOF > "$rootdir/usr/bin/install_scuttlebot"
#!/bin/bash
chown -R $(whoami):$(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
chown -R $(whoami):$(whoami) ~/.npm
if ! npm install --arch=$NPM_ARCH -g scuttlebot@${SCUTTLEBOT_VERSION}; then
exit 2
fi