-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Script is always run as root #59
Comments
Sorry for the trouble. but I would like to keep the current behavior. thanks |
No worries. I think changing the default would be a bad idea as it might break people's existing workflows, but would you accept a patch to add an option? |
Yes, of course, as long as we don't change the default behavior. |
You can create a new user or do any other initializations in the onStarted.sh hook: https://github.com/vmactions/freebsd-vm/blob/main/hooks/onStarted.sh |
Right now the "run" part is always run as the root user; this is an issue because I want to test a case where the user doesn't have permission to a file, but root always has access so it fails.
Other CI runners (e.g. the ubuntu and macos ones provided by GitHub) run as a regular unprivileged user; so it's a bit inconsistent.
I fixed it in my CI with:
But it would probably be a good idea to do something like that by default; it took me quite a while to figure out why the tests were working locally but were failing on the CI 😅
This is also an issue with the NetBSD and OpenBSD VMs, but I didn't create an issue for those of them.
The text was updated successfully, but these errors were encountered: