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

Respect $HOME on macOS for caching #584

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ if the [Runner Image](https://github.com/actions/runner-images) is very similar
* Make sure to use the same operating system and version.
* Make sure to use the same version of libssl.
* Make sure that the operating system has `libyaml-0` and [`libgmp`](https://stackoverflow.com/questions/26555902/ruby-v-dyld-library-not-loaded-usr-local-lib-libgmp-10-dylib) installed
* The default tool cache directory (`/opt/hostedtoolcache` on Linux, `/Users/runner/hostedtoolcache` on macOS,
* The default tool cache directory (`/opt/hostedtoolcache` on Linux, `$HOME/hostedtoolcache` on macOS,
`C:/hostedtoolcache/windows` on Windows) must be writable by the `runner` user.
This is necessary since the Ruby builds embed the install path when built and cannot be moved around.
* `/home/runner` must be writable by the `runner` user.
Expand Down
2 changes: 1 addition & 1 deletion common.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ function getDefaultToolCachePath() {
if (platform.startsWith('ubuntu-')) {
return '/opt/hostedtoolcache'
} else if (platform.startsWith('macos-')) {
return '/Users/runner/hostedtoolcache'
return path.join(os.homedir(), 'hostedtoolcache')
} else if (platform.startsWith('windows-')) {
return 'C:\\hostedtoolcache\\windows'
} else {
Expand Down