Switched order of manager check.

This commit is contained in:
Josh W 2024-07-12 12:15:24 -04:00
parent cee33dacef
commit 8d76c9b4b1
2 changed files with 6 additions and 6 deletions

View file

@ -3,10 +3,10 @@
_hopon_completions () { _hopon_completions () {
# Check to see if a container/VM manager is installed. # Check to see if a container/VM manager is installed.
local vm_manager="" local vm_manager=""
if [ -x "$(command -v lxc)" ]; then if [ -x "$(command -v incus)" ]; then
vm_manager="lxc"
elif [ -x "$(command -v incus)" ]; then
vm_manager="incus" vm_manager="incus"
elif [ -x "$(command -v lxc)" ]; then
vm_manager="lxc"
else else
return return
fi fi

View file

@ -7,10 +7,10 @@ if [ -z "$1" ]; then
fi fi
# Check to see if a container/VM manager is installed. # Check to see if a container/VM manager is installed.
if [ -x "$(command -v lxc)"] ]; then if [ -x "$(command -v incus)"] ]; then
vm_manager="lxc"
elif [ -x "$(command -v incus)"] ]; then
vm_manager="incus" vm_manager="incus"
elif [ -x "$(command -v lxc)"] ]; then
vm_manager="lxc"
else else
echo "No suitable container/VM manager detected." echo "No suitable container/VM manager detected."
echo "Make sure you have \"lxc\" or \"incus\" installed." echo "Make sure you have \"lxc\" or \"incus\" installed."