Skip to content

Commit

Permalink
fixup! Require = for --tmpdir in mktemp
Browse files Browse the repository at this point in the history
  • Loading branch information
tmccombs committed Jun 22, 2023
1 parent 4262e2a commit 6dc2993
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/uu/mktemp/src/mktemp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ impl Options {
(tmpdir, template.to_string())
}
Some(template) => {
let tmpdir = if env::var(TMPDIR_ENV_VAR).is_ok() && matches.get_flag(OPT_T) {
env::var(TMPDIR_ENV_VAR).ok()
let tmpdir = if env::var(TMPDIR_ENV_VAR).is_ok() && matches.get_flag(OPT_T) {
env::var_os(TMPDIR_ENV_VAR).map(|t| t.into())
} else if tmpdir.is_some() {
tmpdir
} else if matches.get_flag(OPT_T) || matches.contains_id(OPT_TMPDIR) {
Expand Down

0 comments on commit 6dc2993

Please sign in to comment.