From b19ba13affe9fb3cbd427340f353567fb2eb6050 Mon Sep 17 00:00:00 2001 From: neil Date: Tue, 27 Sep 2016 21:27:43 +0800 Subject: [PATCH] fix for Mac osx --- acme.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/acme.sh b/acme.sh index bf634f1c..e748a063 100755 --- a/acme.sh +++ b/acme.sh @@ -104,7 +104,8 @@ _info() { _err() { _log "$@" - __red "$(_printargs "$@")\n" >&2 + __red "$(_printargs "$@")" >&2 + printf "\n" >&2 return 1 } @@ -844,8 +845,11 @@ _time() { _mktemp() { if _exists mktemp ; then - mktemp - return + if mktemp 2>/dev/null ; then + return + elif _contains "$(mktemp 2>&1)" "-t prefix" && mktemp -t "$PROJECT_NAME" 2>/dev/null ; then + return + fi fi if [ -d "/tmp" ] ; then echo "/tmp/${PROJECT_NAME}wefADf24sf.$(_time).tmp"