File tree Expand file tree Collapse file tree 4 files changed +19
-3
lines changed
Expand file tree Collapse file tree 4 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 66if [ " $( limactl ls -q " $LIMA_INSTANCE " 2> /dev/null) " != " $LIMA_INSTANCE " ]; then
77 echo " instance \" $LIMA_INSTANCE \" does not exist, run \` limactl create --name=$LIMA_INSTANCE template://apptainer\` to create a new instance" >&2
88 exit 1
9+ elif [ " $( limactl ls -f ' {{ .Status }}' " $LIMA_INSTANCE " 2> /dev/null) " != " Running" ]; then
10+ echo " instance \" $LIMA_INSTANCE \" is not running, run \` limactl start $LIMA_INSTANCE \` to start the existing instance" >&2
11+ exit 1
912fi
1013export LIMA_INSTANCE
1114if [ -n " $APPTAINER_BINDPATH " ]; then
Original file line number Diff line number Diff line change 66if [ " $( limactl ls -q " $LIMA_INSTANCE " 2> /dev/null) " != " $LIMA_INSTANCE " ]; then
77 echo " instance \" $LIMA_INSTANCE \" does not exist, run \` limactl create --name=$LIMA_INSTANCE template://docker\` to create a new instance" >&2
88 exit 1
9+ elif [ " $( limactl ls -f ' {{ .Status }}' " $LIMA_INSTANCE " 2> /dev/null) " != " Running" ]; then
10+ echo " instance \" $LIMA_INSTANCE \" is not running, run \` limactl start $LIMA_INSTANCE \` to start the existing instance" >&2
11+ exit 1
912fi
1013DOCKER=$( command -v " $DOCKER " || true)
1114if [ -n " $DOCKER " ]; then
Original file line number Diff line number Diff line change @@ -4,20 +4,27 @@ set -eu
44: " ${KUBECTL:= kubectl} "
55
66if [ -z " $LIMA_INSTANCE " ]; then
7- if [ " $( limactl ls -f ' {{.Status}} ' k3s 2> /dev/null) " = " Running " ]; then
7+ if [ " $( limactl ls -q k3s 2> /dev/null) " = " k3s " ]; then
88 LIMA_INSTANCE=k3s
9- elif [ " $( limactl ls -f ' {{.Status}} ' k8s 2> /dev/null) " = " Running " ]; then
9+ elif [ " $( limactl ls -q k8s 2> /dev/null) " = " k8s " ]; then
1010 LIMA_INSTANCE=k8s
1111 else
12- echo " No k3s or k8s running instances found. Either create one with" >&2
12+ echo " No k3s or k8s existing instances found. Either create one with" >&2
1313 echo " limactl create --name=k3s template://k3s" >&2
1414 echo " limactl create --name=k8s template://k8s" >&2
1515 echo " or set LIMA_INSTANCE to the name of your Kubernetes instance" >&2
1616 exit 1
1717 fi
18+ if [ " $( limactl ls -f ' {{.Status}}' " $LIMA_INSTANCE " 2> /dev/null) " != " Running" ]; then
19+ echo " instance \" $LIMA_INSTANCE \" is not running, run \` limactl start $LIMA_INSTANCE \` to start the existing instance" >&2
20+ exit 1
21+ fi
1822elif [ " $( limactl ls -q " $LIMA_INSTANCE " 2> /dev/null) " != " $LIMA_INSTANCE " ]; then
1923 echo " instance \" $LIMA_INSTANCE \" does not exist, run \` limactl create --name=$LIMA_INSTANCE \` to create a new instance" >&2
2024 exit 1
25+ elif [ " $( limactl ls -f ' {{ .Status }}' " $LIMA_INSTANCE " 2> /dev/null) " != " Running" ]; then
26+ echo " instance \" $LIMA_INSTANCE \" is not running, run \` limactl start $LIMA_INSTANCE \` to start the existing instance" >&2
27+ exit 1
2128fi
2229KUBECTL=$( command -v " $KUBECTL " || true)
2330if [ -n " $KUBECTL " ]; then
Original file line number Diff line number Diff line change 66if [ " $( limactl ls -q " $LIMA_INSTANCE " 2> /dev/null) " != " $LIMA_INSTANCE " ]; then
77 echo " instance \" $LIMA_INSTANCE \" does not exist, run \` limactl create --name=$LIMA_INSTANCE template://podman\` to create a new instance" >&2
88 exit 1
9+ elif [ " $( limactl ls -f ' {{ .Status }}' " $LIMA_INSTANCE " 2> /dev/null) " != " Running" ]; then
10+ echo " instance \" $LIMA_INSTANCE \" is not running, run \` limactl start $LIMA_INSTANCE \` to start the existing instance" >&2
11+ exit 1
912fi
1013PODMAN=$( command -v " $PODMAN " || true)
1114if [ -n " $PODMAN " ]; then
You can’t perform that action at this time.
0 commit comments