File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change 107
107
# Probably `limactl create` should have "dry run" mode that just generates `lima.yaml`.
108
108
# shellcheck disable=SC2086
109
109
" ${LIMACTL_CREATE[@]} " ${LIMACTL_CREATE_ARGS} --set " .additionalDisks=null" --name=" ${NAME} -tmp" " $FILE_HOST "
110
- case " $( yq ' .networks[].lima' " ${LIMA_HOME} /${NAME} -tmp/lima.yaml" ) " in
111
- " shared" )
112
- CHECKS[" vmnet" ]=1
113
- ;;
114
- " user-v2" )
115
- CHECKS[" port-forwards" ]=" "
116
- CHECKS[" user-v2" ]=1
117
- ;;
118
- esac
110
+ # skipping the missing yq as it is not a fatal error because networks we are looking for are not supported on windows
111
+ if command -v yq & > /dev/null; then
112
+ case " $( yq ' .networks[].lima' " ${LIMA_HOME} /${NAME} -tmp/lima.yaml" ) " in
113
+ " shared" )
114
+ CHECKS[" vmnet" ]=1
115
+ ;;
116
+ " user-v2" )
117
+ CHECKS[" port-forwards" ]=" "
118
+ CHECKS[" user-v2" ]=1
119
+ ;;
120
+ esac
121
+ else
122
+ WARNING " yq not found. Skipping network checks"
123
+ fi
119
124
limactl rm -f " ${NAME} -tmp"
120
125
121
126
if [[ -n ${CHECKS["port-forwards"]} ]]; then
You can’t perform that action at this time.
0 commit comments