Fix issue on OS X when creating a temporary file

This prevents the "mktemp: too few X's in template
_stacklib_" error message from appearing when
adding another admin to blackbox and allows the command to successfully
execute.

    Related:
    rtomayko/shocco#5
    http://unix.stackexchange.com/q/87638/63283
This commit is contained in:
tlimoncelli@stackexchange.com
2015-07-28 08:21:52 -04:00
parent 1f2d99436d
commit 343b85a34c

View File

@@ -55,7 +55,7 @@ function create_self_deleting_tempfile() {
case $(uname -s) in case $(uname -s) in
Darwin ) Darwin )
: ${TMPDIR:=/tmp} ; : ${TMPDIR:=/tmp} ;
filename=$(mktemp -t _stacklib_ ) filename=$(mktemp -t _stacklib_.XXXXXXXX )
;; ;;
Linux ) Linux )
filename=$(mktemp) filename=$(mktemp)