act icon indicating copy to clipboard operation
act copied to clipboard

fix: EACCESS error regarding /opt/hostedtoolcache

Open AndesKrrrrrrrrrrr opened this issue 1 year ago • 4 comments

The RUNNER_TOOL_CACHE environment variable points to the hard-coded /opt/hostedtoolcache, which is not user-accessible.

AndesKrrrrrrrrrrr avatar Jan 30 '24 09:01 AndesKrrrrrrrrrrr

Please note: RUNNER_TOOL_CACHE from the process is not the same filesystem as the one from the container.

Does act --env RUNNER_TOOL_CACHE=path not work for you?

Maybe ${{ runner.tool_cache }} would have old values in that case, act is so buggy no idea about side effects.

Access to /opt/hostedtoolcache can be fixed if the volume is mounted correctly on that location..., see another old PR

ChristopherHX avatar Jan 30 '24 13:01 ChristopherHX

Can elaborate more on the host vs. container RUNNER_TOOL_CACHE?

Does act --env RUNNER_TOOL_CACHE=path not work for you?

It does, but that means I have to set it manually on every run. Here I'm trying to address it with sane defaults, like we do with socketLocation(). Also, I find it crazy to default (hard-coded) to a system-level directory.

AndesKrrrrrrrrrrr avatar Jan 30 '24 16:01 AndesKrrrrrrrrrrr

I have to set it manually on every run

No, not needed.

.actrc in the root/cwd of your repo or $HOME, some xdg dir.

--env RUNNER_TOOL_CACHE=path

I believe even

--env RUNNER_TOOL_CACHE=${RUNNER_TOOL_CACHE}

works recently

ChristopherHX avatar Jan 30 '24 16:01 ChristopherHX

I find it crazy to default (hard-coded) to a system-level directory.

This change https://github.com/nektos/act/pull/1494 would enshure it exists in all cases.

ChristopherHX avatar Jan 30 '24 17:01 ChristopherHX

Closing, since this seems to be not an issue anymore according to your comment :smile:

AndesKrrrrrrrrrrr avatar Feb 15 '24 13:02 AndesKrrrrrrrrrrr