From 26f0bcd858ee2d1dd19e403090c9f0d079fca1f5 Mon Sep 17 00:00:00 2001 From: ronivay Date: Sat, 4 Apr 2020 20:49:41 +0300 Subject: [PATCH] Don't give error fron find command during rollback if xo-builds directory doesn't exist --- xo-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xo-install.sh b/xo-install.sh index 1978536..74907a0 100755 --- a/xo-install.sh +++ b/xo-install.sh @@ -563,10 +563,10 @@ function HandleArgs { function RollBackInstallation { - INSTALLATIONS=($(find $INSTALLDIR/xo-builds/ -maxdepth 1 -type d -name "xen-orchestra-*")) + INSTALLATIONS=($(find $INSTALLDIR/xo-builds/ -maxdepth 1 -type d -name "xen-orchestra-*" 2>/dev/null)) if [[ $(echo ${#INSTALLATIONS[@]}) -le 1 ]]; then - echo -e "${INFO} Only one installation exists, nothing to change" + echo -e "${INFO} One or less installations exist, nothing to change" exit 0 fi