From: nobu@... Date: 2020-06-22T04:08:14+00:00 Subject: [ruby-core:98907] [Ruby master Feature#16975] Warn when value from environment is being ignored by `Dir.tmpdir` Issue #16975 has been updated by nobu (Nobuyoshi Nakada). I think it would be acceptable. That "silent rescue" is actually for `File.stat` only, that is an obvious case. I guess you may want to split the following conditions. ---------------------------------------- Feature #16975: Warn when value from environment is being ignored by `Dir.tmpdir` https://bugs.ruby-lang.org/issues/16975#change-86288 * Author: deivid (David Rodr�guez) * Status: Open * Priority: Normal ---------------------------------------- Currently, if you set `ENV["TMPDIR"]` to a value that doesn't meet `Dir.tmpdir` criteria to become the temporary folder, the environment variable is silently ignored and the next variable in the chain is checked. This makes issues quite hard to debug, because the temporary folder can get silently set to a value you don't expect. An example of this is: https://github.com/rubygems/rubygems/issues/3649. And I believe some failures I run into in https://github.com/ruby/ruby/pull/3211 were caused by the same issue. Would it be useful to replace the following "silent rescue" to introduce a warning when it's hit? https://github.com/ruby/tmpdir/blob/b08fec48d5cef93ea3dbaa604c9e0b833f086dae/lib/tmpdir.rb#L30 I'm happy to create a PR if this is accepted. -- https://bugs.ruby-lang.org/ Unsubscribe: