From 5066a0a81652aed0b73c5321592591b9d49907e4 Mon Sep 17 00:00:00 2001 From: Eric Mertens Date: Fri, 26 Jul 2019 09:45:30 -0700 Subject: [PATCH] Don't check for xz on darwin xz is not needed on darwin and checking for it generates a lot of questions for new users that we could easily avoid. --- ghcup | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ghcup b/ghcup index 648e819..cbe16af 100755 --- a/ghcup +++ b/ghcup @@ -590,13 +590,20 @@ command_exists() { check_required_commands() { _missing_commands= - for com in "$@" awk uname basename tar xz gzip mktemp dirname ; do + for com in "$@" awk uname basename tar gzip mktemp dirname ; do command_exists "${com}" || { _missing_commands="${_missing_commands} ${com}" } done unset com + # darwin uses tar's built-in xz decompression + if test "${mydistro}" != "darwin"; then + command_exists xz || { + _missing_commands="${_missing_commands} xz" + } + fi + if [ -n "${_missing_commands}" ] ; then printf "%s" "${_missing_commands}" unset _missing_commands