Commit fda76f0
committed
fix: ignore '$TMPDIR' when it is an unusable directory
A recent audit of Ubuntu’s Rust utilities¹ led me to learn that
`$TMPDIR` is only intended to be used when the directory it points to is
accessible:²
If applications are written to use temporary or intermediate files,
they should use the _TMPDIR_ environment variable, if it is set and
represents an accessible directory, to select the location of
temporary files.
The effect of this change is that `vimcat --help` with an unusable
`$TMPDIR` set will now fall back to using /tmp instead of trying (and
failing) to use this `$TMPDIR`.
¹ https://discourse.ubuntu.com/t/an-update-on-rust-coreutils/80773
² https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap01.html1 parent 7417839 commit fda76f0
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
0 commit comments