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

fix(cache): scope cache directory to user #332

Merged
merged 5 commits into from Oct 17, 2023
Merged

fix(cache): scope cache directory to user #332

merged 5 commits into from Oct 17, 2023

Conversation

dcousens
Copy link
Contributor

@dcousens dcousens commented Oct 5, 2023

If you use tsx in a Unix environment where different users are executing tsx at the same time, you'll end up trying to share /tmp/tsx.

Error: EACCES: permission denied, scandir '/tmp/tsx'

This attempts to resolve that problem by using the executing uid in the cache directory name.
Seeing as the unix permissions of the /tmp/tsx directory already has the uid as meta information, this doesn't reveal anything new, but it does prevent the naming conflict.

> path.join(os.tmpdir(), `tsx-${os.userInfo().uid}`)
'/tmp/tsx-1000'

I don't know what behavior this will have on non-unix systems

@privatenumber privatenumber changed the title Fix EACCESS error on unix systems fix(cache): scope cache directory to user Oct 5, 2023
@privatenumber privatenumber merged commit 7e916f5 into privatenumber:develop Oct 17, 2023
1 check passed
@privatenumber
Copy link
Owner

🎉 This issue has been resolved in v3.14.0

If you appreciate this project, please consider supporting this project by sponsoring ❤️ 🙏

@dcousens dcousens deleted the patch-1 branch October 17, 2023 22:51
@dcousens
Copy link
Contributor Author

Thanks @privatenumber!

@ST-DDT
Copy link
Contributor

ST-DDT commented Oct 23, 2023

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

Successfully merging this pull request may close these issues.

None yet

3 participants