Skip to content

Commit

Permalink
Allow bower to be run as root
Browse files Browse the repository at this point in the history
Without this change, we get the following error while running in a docker container

```
Updating bower

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.

You can however run a command with sudo using "--allow-root" option
```

Since the default user in the container is `root`, this is actually an expected
use case for us.

I tried to avoid this by calling `bower update --allow-root` in the docker
setup script e-mission/e-mission-docker#18

But that ran into multiple inconsistencies (
e-mission/e-mission-docs#657 (comment)
e-mission/e-mission-docs#657 (comment)
)

In order to avoid more bitrotted containers, just changing the code in the
setup script so it works in the container as well

This fixes e-mission/e-mission-docs#657
  • Loading branch information
shankari committed Aug 9, 2021
1 parent cc16088 commit 2b342a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup/setup_serve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo "Setting up all npm packages"
npm install

echo "Updating bower"
npx bower update
npx bower update --allow-root

echo "Pulling the plugin-specific UIs"
npm run setup-serve

0 comments on commit 2b342a5

Please sign in to comment.