Skip to content

Commit 3c289ee

Browse files
committed
inject-cmdline-to-template.sh: use limactl edit instead of yq -i
Signed-off-by: Norio Nomura <[email protected]>
1 parent 0e93110 commit 3c289ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hack/inject-cmdline-to-template.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function inject_to() {
9191
for field_name in location digest cmdline; do
9292
[[ -z ${!field_name} ]] || fields+=("\"${field_name}\": \"${!field_name}\"")
9393
done
94-
yq -i -I 2 eval "setpath([(.images[] | select(.arch == \"${arch}\") | path)].[${index}] + \"${key}\"; { ${fields[*]}})" "${template}"
94+
limactl edit --log-level error --set "setpath([(.images[] | select(.arch == \"${arch}\") | path)].[${index}] + \"${key}\"; { ${fields[*]}})" "${template}"
9595
}
9696
inject_to "${template}" "${arch}" "${index}" "kernel" "${kernel_location}" "${kernel_digest}" "${cmdline}"
9797
inject_to "${template}" "${arch}" "${index}" "initrd" "${initrd_location}" "${initrd_digest}"

0 commit comments

Comments
 (0)