Skip to content

Commit 51f8850

Browse files
authored
tidy tmpdir logic
`mkdir -p` is already run elsewhere
1 parent dcdf79d commit 51f8850

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

scripts/helpers.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,7 @@ command_exists() {
6565

6666
get_tmp_dir() {
6767
local tmpdir="${TMPDIR:-${TMP:-${TEMP:-/tmp}}}"
68-
if [ ! -d "$tmpdir" ]; then
69-
local tmpdir=~/tmp
70-
mkdir -p $tmpdir
71-
fi
68+
[ -d "$tmpdir" ] || local tmpdir=~/tmp
7269
echo "$tmpdir/tmux-$EUID-cpu"
7370
}
7471

0 commit comments

Comments
 (0)