Skip to content

Commit 3fc0281

Browse files
authored
Merge pull request #98 from rancher-sandbox/spaces
Don't just source lima.env; value might include spaces
2 parents 1c08161 + 34b03da commit 3fc0281

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)