Skip to content

Commit

Permalink
Fix tmp-dir script to test properly for /usr/tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoduncan committed Apr 27, 2016
1 parent f921bf0 commit 29c9d96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pallet/script/lib.clj
Expand Up @@ -331,7 +331,7 @@
(println "/tmp")
(if (directory? "/var/tmp")
(println "/var/tmp")
(if (directory? "/use/tmp")
(if (directory? "/usr/tmp")
(println "/usr/tmp"))))))))

(script/defscript make-temp-file [pattern & {:keys [tmpdir]}])
Expand Down
2 changes: 1 addition & 1 deletion test/pallet/script/lib_test.clj
Expand Up @@ -51,7 +51,7 @@
(deftest tmpdir-test
(is (= "${TMPDIR:-${TEMP:-${TMP:-$(if [ -d /tmp ]; then echo /tmp;else
if [ -d /var/tmp ]; then echo /var/tmp;else
if [ -d /use/tmp ]; then echo /usr/tmp;fi
if [ -d /usr/tmp ]; then echo /usr/tmp;fi
fi
fi)}}}"
(fragment (~tmp-dir)))))
Expand Down

0 comments on commit 29c9d96

Please sign in to comment.