-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
Dir.tmpdir returns working directory #4184
Comments
It looks like e292b95 changed this behavior as part of the fix for #3983. Previously, there was a conditional This doesn't seem desirable - |
FWIW, I ran into this issue as well. But since |
As a follow up on this, specifying the various environment variables doesn't work so long as they're world writable. So the only way to specify the temp directory in 9.1.3.0 - 9.1.5.0 is to either create a specific alternate non-world-writable temp directory or hope that the execution context doesn't match the condition. |
@tobymurray-nanometrics Yeah it seems like we need to restore the sticky bit check. |
Ok, it looks like this change came in as part of updating stdlib to 2.3.1. We had removed this upper section previously but not updated our stdlib fork. Fixing. |
This explains why I've been seeing temporary files from some tests/specs showing up in cwd. Thanks for the investigation! Maybe someone can come up with a spec for https://github.com/ruby/spec? cc @eregon |
This may be related to #405, but it seems inconsistent if nothing else. No environment variables presently set for temp directory.
Environment
JRuby version:
jruby 9.1.5.0 (2.3.1) 2016-09-07 036ce39 OpenJDK 64-Bit Server VM 25.91-b14 on 1.8.0_91-8u91-b14-3ubuntu1~16.04.1-b14 +jit [linux-x86_64]
OS:
Linux toby-VirtualBox 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Steps
Dir.tmpdir
Expected Behavior
In JRuby 9.0.5.0 - 9.1.2.0, 1.7.24, as well as MRI 2.3.1p112 (2016-04-26 revision 54768)
Actual Behavior
Additionally, I tried setting the various environment variables with no success:
Note that the following works as expected:
The text was updated successfully, but these errors were encountered: