Allow bower to install with sudo

Without `--allow-root`, bower throws the following:

```
bower ESUDO         Cannot be run with sudo

Additional error details:
Since bower is a user command, there is no need to execute it with superuser permissions.
If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.

http://www.joyent.com/blog/installing-node-and-npm
https://gist.github.com/isaacs/579814

You can however run a command with sudo using --allow-root option
```
This commit is contained in:
Chris Jones 2014-09-18 01:46:13 -04:00
parent de3b2d66c3
commit dfb7fa7619

View file

@ -43,7 +43,7 @@ libffi-dev nodejs libyaml-dev
# Install frontend assets # Install frontend assets
sudo npm install -g bower sudo npm install -g bower
sudo -iu ${APP_USER} bower --config.cwd=${APP_DIR} --config.directory=realms/static/vendor --config.interactive=false install sudo -iu ${APP_USER} bower --allow-root --config.cwd=${APP_DIR} --config.directory=realms/static/vendor --config.interactive=false install
sudo -iu ${APP_USER} virtualenv ${APP_DIR}/.venv sudo -iu ${APP_USER} virtualenv ${APP_DIR}/.venv
@ -63,4 +63,4 @@ start on runlevel [2345]
stop on runlevel [!2345] stop on runlevel [!2345]
respawn respawn
exec /usr/local/bin/realms-wiki run exec /usr/local/bin/realms-wiki run
EOF EOF