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

Forced to use /Users/runner for hostedtoolscache; need a way to override #974

Open
NorseGaud opened this issue Oct 30, 2024 · 4 comments
Open
Assignees
Labels
feature request New feature or request to improve the current logic

Comments

@NorseGaud
Copy link

process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache';

Requesting that there be a way to override /Users/runner to avoid"

Run actions/setup-python@v5
Installed versions
  Version 3.9 was not found in the local cache
  Version 3.9 is available for downloading
  Download from "https://github.com/actions/python-versions/releases/download/3.9.13-11183687820/python-3.9.13-darwin-arm64.tar.gz"
  Extract downloaded archive
  /usr/bin/tar xz -C /Users/anka/actions-runner/_work/_temp/88d733fe-3d68-4222-bfad-274b280a0c83 -f /Users/anka/actions-runner/_work/_temp/084fd4fb-7571-406e-99db-04b625fe9363
  Execute installation script
  Check if Python hostedtoolcache folder exist...
  Creating Python hostedtoolcache folder...
  Error: mkdir: /Users/runner: Permission denied
  Error: The process '/bin/bash' failed with exit code 1

Our macOS machines are not created with the runner user.

@NorseGaud
Copy link
Author

I tried setting env: in the yaml but that doesn't work. Maybe someone has an example?

@mahabaleshwars
Copy link

Hello @NorseGaud,
Thank you for creating this issue. We will investigate it and provide feedback as soon as we have some updates.

@aparnajyothi-y aparnajyothi-y added the feature request New feature or request to improve the current logic label Nov 5, 2024
@aparnajyothi-y
Copy link
Contributor

Hello, Thank you for your feature request and the thoughtful explanation. After reviewing the situation, we’ve decided not to implement an override for the default Python tool cache directory at this time. The solution to this issue is already outlined in our documentation, and we encourage users to refer to that guidance for resolving the permission-related errors on macOS self-hosted runners.

You can find the detailed solution here: Documentation

This documentation provides a reliable way to handle this scenario. Thank you for your understanding, and we appreciate your continued engagement with the project.

@aparnajyothi-y aparnajyothi-y self-assigned this Feb 10, 2025
@NorseGaud
Copy link
Author

Thanks @aparnajyothi-y , but that's not a reliable solution:

❯ whoami
nathanpierce
❯ mkdir /Users/runner
mkdir: /Users/runner: Permission denied

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

3 participants