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 6
6
if [ " $( limactl ls -q " $LIMA_INSTANCE " 2> /dev/null) " != " $LIMA_INSTANCE " ]; then
7
7
echo " instance \" $LIMA_INSTANCE \" does not exist, run \` limactl create --name=$LIMA_INSTANCE template://apptainer\` to create a new instance" >&2
8
8
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
9
12
fi
10
13
export LIMA_INSTANCE
11
14
if [ -n " $APPTAINER_BINDPATH " ]; then
Original file line number Diff line number Diff line change 6
6
if [ " $( limactl ls -q " $LIMA_INSTANCE " 2> /dev/null) " != " $LIMA_INSTANCE " ]; then
7
7
echo " instance \" $LIMA_INSTANCE \" does not exist, run \` limactl create --name=$LIMA_INSTANCE template://docker\` to create a new instance" >&2
8
8
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
9
12
fi
10
13
DOCKER=$( command -v " $DOCKER " || true)
11
14
if [ -n " $DOCKER " ]; then
Original file line number Diff line number Diff line change @@ -4,20 +4,27 @@ set -eu
4
4
: " ${KUBECTL:= kubectl} "
5
5
6
6
if [ -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
8
8
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
10
10
LIMA_INSTANCE=k8s
11
11
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
13
13
echo " limactl create --name=k3s template://k3s" >&2
14
14
echo " limactl create --name=k8s template://k8s" >&2
15
15
echo " or set LIMA_INSTANCE to the name of your Kubernetes instance" >&2
16
16
exit 1
17
17
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
18
22
elif [ " $( limactl ls -q " $LIMA_INSTANCE " 2> /dev/null) " != " $LIMA_INSTANCE " ]; then
19
23
echo " instance \" $LIMA_INSTANCE \" does not exist, run \` limactl create --name=$LIMA_INSTANCE \` to create a new instance" >&2
20
24
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
21
28
fi
22
29
KUBECTL=$( command -v " $KUBECTL " || true)
23
30
if [ -n " $KUBECTL " ]; then
Original file line number Diff line number Diff line change 6
6
if [ " $( limactl ls -q " $LIMA_INSTANCE " 2> /dev/null) " != " $LIMA_INSTANCE " ]; then
7
7
echo " instance \" $LIMA_INSTANCE \" does not exist, run \` limactl create --name=$LIMA_INSTANCE template://podman\` to create a new instance" >&2
8
8
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
9
12
fi
10
13
PODMAN=$( command -v " $PODMAN " || true)
11
14
if [ -n " $PODMAN " ]; then
You can’t perform that action at this time.
0 commit comments