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

os.getTempDir() doesn't use the TMPDIR env var on POSIX systems #11439

Closed
stefantalpalaru opened this issue Jun 8, 2019 · 1 comment · Fixed by #11443
Closed

os.getTempDir() doesn't use the TMPDIR env var on POSIX systems #11439

stefantalpalaru opened this issue Jun 8, 2019 · 1 comment · Fixed by #11443
Labels
OS/Architecture Specific OS (stdlib) Related to OS modules in standard library Standard Library

Comments

@stefantalpalaru
Copy link
Contributor

This environment variable is documented here: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html

I ran into this by debugging a test failure in Gentoo's Portage sandbox which denies access to "/tmp" in favour of another directory defined in TMPDIR.

@kaushalmodi
Copy link
Contributor

Yeah, even though the docstring suggests using -d:tempDir, I think that it should check if the TMPDIR env var is defined and then finally resort to the hard coded /tmp.

kaushalmodi added a commit to kaushalmodi/Nim that referenced this issue Jun 9, 2019
Additionally, use normalizePathEnd to suffix the dir name with "/" or
"\" as appropriate for the current OS.

Fixes nim-lang#11439.
kaushalmodi added a commit to kaushalmodi/Nim that referenced this issue Jun 9, 2019
Additionally, use normalizePathEnd to suffix the dir name with "/" or
"\" as appropriate for the current OS.

Fixes nim-lang#11439.
kaushalmodi added a commit to kaushalmodi/Nim that referenced this issue Jun 9, 2019
Additionally, use normalizePathEnd to suffix the dir name with "/" or
"\" as appropriate for the current OS.

Fixes nim-lang#11439.
@mratsim mratsim added OS/Architecture Specific OS (stdlib) Related to OS modules in standard library Standard Library labels Jun 9, 2019
kaushalmodi added a commit to kaushalmodi/Nim that referenced this issue Jun 9, 2019
Additionally, use normalizePathEnd to suffix the dir name with "/" or
"\" as appropriate for the current OS.

Fixes nim-lang#11439.
Araq pushed a commit that referenced this issue Jun 10, 2019
…gfix]

Additionally, use normalizePathEnd to suffix the dir name with "/" or
"\" as appropriate for the current OS.

Fixes #11439.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS/Architecture Specific OS (stdlib) Related to OS modules in standard library Standard Library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants