From 077ed765b7eb71471734326866c15b0a8f60e076 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Wed, 21 Aug 2019 19:28:35 +0800 Subject: [PATCH] Fix command_exists for darwin --- ghcup | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ghcup b/ghcup index 5a8d5a3..e812fb6 100755 --- a/ghcup +++ b/ghcup @@ -589,6 +589,7 @@ command_exists() { # @RETURNS: 0 if all command exists, non-zero otherwise check_required_commands() { _missing_commands= + mydistro=$(get_distro_alias "$(get_distro_name)") for com in "$@" awk uname basename tar gzip mktemp dirname ; do command_exists "${com}" || { @@ -606,10 +607,10 @@ check_required_commands() { if [ -n "${_missing_commands}" ] ; then printf "%s" "${_missing_commands}" - unset _missing_commands + unset _missing_commands mydistro return 1 else - unset _missing_commands + unset _missing_commands mydistro return 0 fi }