From 021a983e912ca584340e18bbde39eca59b968e9a Mon Sep 17 00:00:00 2001 From: Alex McLean Date: Thu, 31 Oct 2019 06:42:05 -0400 Subject: [PATCH] Add template to mktemp commands, for compatibility with earlier versions of MacOS. Ref: https://forum.toplap.org/t/trouble-setting-up-tidal-stack-install/902/20 --- ghcup | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ghcup b/ghcup index 5f59cb5..2d1f759 100755 --- a/ghcup +++ b/ghcup @@ -1414,7 +1414,7 @@ install_ghc() { first_install=false fi - tmp_dir=$(mktemp -d) + tmp_dir=$(mktemp -d -t ghcup.XXXXXXXX) [ -z "${tmp_dir}" ] && die "Failed to create temporary directory" ( if ${CACHING} ; then @@ -1554,7 +1554,7 @@ upgrade() { status_message "Updating ${SCRIPT}" ( - edo cd "$(mktemp -d)" + edo cd "$(mktemp -d -t ghcup.XXXXXXXX)" download "${SCRIPT_UPDATE_URL}" edo chmod +x ghcup edo mv -f ghcup "${target_location}"/ghcup @@ -1679,7 +1679,7 @@ install_cabal() { edo mkdir -p "${inst_location}" - tmp_dir=$(mktemp -d) + tmp_dir=$(mktemp -d -t ghcup.XXXXXXXX) [ -z "${tmp_dir}" ] && die "Failed to create temporary directory" ( if ${CACHING} ; then @@ -1741,7 +1741,7 @@ compile_ghc() { fi status_message "Compiling GHC for version ${myghcver} from source" - tmp_dir=$(mktemp -d) + tmp_dir=$(mktemp -d -t ghcup.XXXXXXXX) [ -z "${tmp_dir}" ] && die "Failed to create temporary directory" ( if ${CACHING} ; then