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

Add privileged command paths to path in run #3

Open
FWDekker opened this issue Feb 22, 2023 · 1 comment
Open

Add privileged command paths to path in run #3

FWDekker opened this issue Feb 22, 2023 · 1 comment

Comments

@FWDekker
Copy link

Thank you for creating these actions! They've been super useful for me :-)

During the prepare part of the action, I can run pkg_add and pkg_create because they are on the PATH. However, this is not the case during the run part of the action, because there the PATH does not include directories such as /sbin and /usr/sbin.

Specifically, during prepare the PATH is

/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin:/usr/X11R7/bin:/usr/local/sbin:/usr/local/bin

while during run the PATH is

/usr/bin:/bin:/usr/pkg/bin:/usr/local/bin

This is in contrast to openbsd-vm, in which the PATH is the same for both prepare and run (except some entries are reordered).

Would it be possible to make the PATHs for prepare and run the same, so that "privileged" commands are also available during run?

@Neilpang
Copy link
Member

Neilpang commented Mar 2, 2023

I tried , but it's not successful if usesh=true.
I will try more later.

For now, you can use the privileged commands without usesh=true.

you can call the sh in your prepare code if needed.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants