Skip to content

Warn when value from environment is being ignored by Dir.tmpdir #2

@deivid-rodriguez

Description

@deivid-rodriguez

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: ruby/rubygems#3649.

And I believe current failures in ruby/ruby#3211 might be caused by the same issue.

Would it be possible to replace the following "silent rescue" to introduce a warning when it's hit?

end rescue nil

I'm happy to create a PR if this is accepted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions