Added sudo to bower install commands

This commit is contained in:
John Shaver 2017-11-02 23:55:54 -06:00
parent 517923b258
commit e0b51df7c2
1 changed files with 4 additions and 3 deletions

View File

@ -100,9 +100,10 @@ export PATH=/opt/walnut/bin:$PATH
install_walnut
# Install bower, some systems may be missing it, and it is a dependency
/opt/walnut/bin/npm install -g bower
touch /.bowerrc
echo '{ "allow_root": true }' > /.bowerrc
$sudo_cmd /opt/walnut/bin/npm install -g bower
echo '{ "allow_root": true }' > /tmp/.bowerrc
$sudo_cmd mv /tmp/.bowerrc /.bowerrc
$sudo_cmd chown root /.bowerrc
# Restore PATH to original value
export PATH=$old_PATH