From 099d1157c579c7b9fea20945e8504cc15745c598 Mon Sep 17 00:00:00 2001 From: mauwii Date: Wed, 9 Nov 2022 00:16:18 +0100 Subject: [PATCH] better way to make sure if conda is useable --- 1-click-installer/install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/1-click-installer/install.sh b/1-click-installer/install.sh index 176bdcd8a4..fbee171469 100755 --- a/1-click-installer/install.sh +++ b/1-click-installer/install.sh @@ -42,9 +42,8 @@ umamba_exists="F" if [ -e "$INSTALL_ENV_DIR" ]; then export PATH="$INSTALL_ENV_DIR/bin:$PATH"; fi PACKAGES_TO_INSTALL="" - -if ! command conda &>/dev/null; then PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL conda"; fi -if ! command git &>/dev/null; then PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL git"; fi +if ! $(which conda) -V &>/dev/null; then PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL conda"; fi +if ! which git &>/dev/null; then PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL git"; fi if "$MAMBA_ROOT_PREFIX/micromamba" --version &>/dev/null; then umamba_exists="T"; fi