Don't give error fron find command during rollback if xo-builds directory doesn't exist
This commit is contained in:
@@ -563,10 +563,10 @@ function HandleArgs {
|
|||||||
|
|
||||||
function RollBackInstallation {
|
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
|
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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user