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

Disrespecting a $RUNNER_TOOL_CACHE in v1.156.0 #535

Closed
2 tasks done
astlock opened this issue Oct 12, 2023 · 2 comments
Closed
2 tasks done

Disrespecting a $RUNNER_TOOL_CACHE in v1.156.0 #535

astlock opened this issue Oct 12, 2023 · 2 comments

Comments

@astlock
Copy link

astlock commented Oct 12, 2023

Ensure the following before filing this issue

  • I verified it reproduces with the latest version with - uses: ruby/setup-ruby@v1 (see Versioning policy)

  • I tried to reproduce the issue locally by following the workflow steps (including all commands done by ruby/setup-ruby, except for Downloading Ruby & Extracting Ruby),
    and it did not reproduce locally (if it does reproduce locally, it's not a ruby/setup-ruby issue)

Are you running on a GitHub-hosted runner or a self-hosted runner?

self-hosted runner

Link to the failed workflow job (must be a public workflow job, so the necessary information is available)

NA

Any other notes?

Have a RUNNER_TOOL_CACHE=/Users/administrator/gha-agent/_work/_tool variable on runners, which is respected in v1.155.0 but not in v1.156.0.

v1.155.0
Run ruby/setup-ruby@v1.155.0
Modifying PATH
  Entries added to PATH to use selected Ruby:
    /Users/administrator/gha-agent/_work/_tool/Ruby/3.1.2/arm64/bin
Print Ruby version
  /Users/administrator/gha-agent/_work/_tool/Ruby/3.1.2/arm64/bin/ruby --version
  ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin22]
  Took   0.01 seconds
...
v1.156.0
##[group]Run ruby/setup-ruby@v1
with:
  ruby-version: 3.1.2
  bundler-cache: true
env:
  KEYCHAIN: ...
  ...
Modifying PATH
  Entries added to PATH to use selected Ruby:
    /Users/runner/hostedtoolcache/Ruby/3.2.2/arm64/bin
Error: Error: EACCES: permission denied, mkdir '/Users/runner'
macOS overview
ProductName:		macOS
ProductVersion:		13.5.2
BuildVersion:		22G91
kern.version: Darwin Kernel Version 22.6.0: Wed Jul  5 22:17:35 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T8

@astlock astlock changed the title Disrespecting a variable $RUNNER_TOOL_CACHE in v1.156.0 Disrespecting a $RUNNER_TOOL_CACHE in v1.156.0 Oct 12, 2023
@eregon
Copy link
Member

eregon commented Oct 12, 2023

It's expected, it's because macos-arm64 was considered self-hosted runner before and now is considered github-hosted runner.

If you want to use your custom tool-cache you can set self-hosted: true:

self-hosted:

OTOH if instead you make /Users/runner/hostedtoolcache writable then you can use all the prebuilt Rubies on macos-arm64 (those prebuilt Rubies need a fixed path on the filesystem to run).

@eregon eregon closed this as completed Oct 12, 2023
@eregon eregon reopened this Oct 12, 2023
@eregon
Copy link
Member

eregon commented Oct 12, 2023

I need to update the docs because the default for self-hosted no longer depends on the value of $RUNNER_TOOL_CACHE since #475 (comment)

@eregon eregon closed this as completed in 679e23d Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants