Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow bower to be run as root #776

Merged
merged 1 commit into from
Aug 9, 2021

Conversation

shankari
Copy link
Contributor

@shankari shankari commented Aug 9, 2021

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

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
@shankari shankari merged commit 4861faa into e-mission:master Aug 9, 2021
shankari added a commit to shankari/e-mission-docker that referenced this pull request Aug 9, 2021
Duplicating the command led to multiple inconsistencies (
    e-mission/e-mission-docs#657 (comment)
    e-mission/e-mission-docs#657 (comment)
)

So I changed the code in the phone repo instead (e-mission/e-mission-phone#776)
and switched to using only the setup scripts here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant