Skip to content

Commit 34b03da

Browse files
committed
Don't just source lima.env; value might include spaces
Instead copy the code from Lima's boot.sh. This is required to fix lima-vm/lima#933 Signed-off-by: Jan Dubois <[email protected]>
1 parent 1c08161 commit 34b03da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lima-init.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ LIMA_CIDATA_DEV="/dev/disk/by-label/cidata"
1414
mkdir -p -m 700 "${LIMA_CIDATA_MNT}"
1515
mount -o ro,mode=0700,dmode=0700,overriderockperm,exec,uid=0 "${LIMA_CIDATA_DEV}" "${LIMA_CIDATA_MNT}"
1616

17-
. "${LIMA_CIDATA_MNT}"/lima.env
17+
# We can't just source lima.env because values might have spaces in them
18+
while read -r line; do export "$line"; done <"${LIMA_CIDATA_MNT}"/lima.env
1819

1920
# Set hostname
2021
LIMA_CIDATA_HOSTNAME="$(awk '/^local-hostname:/ {print $2}' "${LIMA_CIDATA_MNT}"/meta-data)"

0 commit comments

Comments
 (0)