-
Notifications
You must be signed in to change notification settings - Fork 127
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
Check if HOME can change or not instead of ENV["CI"] #732
Conversation
@znz Sorry that @ko1 reminded me this may be happening but I forgot to follow up. But I'm confused by GH Action's behavior because its document says |
This fails because |
Thanks for explanation 🙏 However, this change also allows modifying
I think we can summarize our needs as:
So maybe the conditions should be this instead? USE_TMP_HOME = !ENV["CI"] || HOME_CANNOT_CHANGE
# startup
@pty_home_dir =
if USE_TMP_HOME
Dir.mktmpdir
else
Dir.home
end
# shutdown
if USE_TMP_HOME
FileUtils.remove_entry @pty_home_dir
end |
ruby#732 (comment) * If it's a local environment, we don't want to modify $HOME * If it's a CI environment, it's fine to write files in $HOME * However, in ruby/actions's CI we also don't want $HOME to be writable
Thank you for your summarize. |
I can confirm it's not affecting local |
ruby#732 (comment) * If it's a local environment, we don't want to modify $HOME * If it's a CI environment, it's fine to write files in $HOME * However, in ruby/actions's CI we also don't want $HOME to be writable
ruby#732 (comment) * If it's a local environment, we don't want to modify $HOME * If it's a CI environment, it's fine to write files in $HOME * However, in ruby/actions's CI we also don't want $HOME to be writable
Tests of snapshot tarball are failed, because the CIs run without write permissions to HOME.
So I want to check the desired feature instead of
ENV["CI"]
.https://github.com/ruby/actions/runs/7617816773?check_suite_focus=true#step:17:2135