Skip to content

Commit 56a3b99

Browse files
authored
Merge pull request #289 from afbjorklund/environment
Make sure that environment file exists
2 parents 0761563 + f59c4fe commit 56a3b99

File tree

1 file changed

+3
-1
lines changed
  • pkg/cidata/cidata.TEMPLATE.d

1 file changed

+3
-1
lines changed

pkg/cidata/cidata.TEMPLATE.d/boot.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ WARNING() {
1212
# shellcheck disable=SC2163
1313
while read -r line; do export "$line"; done <"${LIMA_CIDATA_MNT}"/lima.env
1414

15-
sed -i '/#LIMA-START/,/#LIMA-END/d' /etc/environment
15+
if [ -e /etc/environment ]; then
16+
sed -i '/#LIMA-START/,/#LIMA-END/d' /etc/environment
17+
fi
1618
cat "${LIMA_CIDATA_MNT}/etc_environment" >>/etc/environment
1719

1820
# shellcheck disable=SC2163

0 commit comments

Comments
 (0)