Skip to content

Commit 5af3623

Browse files
committed
Don't try to patch the prompt on other systems
The current script was assuming that "default" is Ubuntu LTS... But now it is possible to mix and match names and templates. Avoid some scary-looking output in the log, if run elsewhere. Signed-off-by: Anders F Björklund <[email protected]>
1 parent fc783ec commit 5af3623

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/cidata/cidata.TEMPLATE.d/boot/08-shell-prompt.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/bin/sh
22
set -eux
33

4-
if [ "${LIMA_CIDATA_NAME}" = "default" ]; then
4+
# This script is only intended for the default.yaml image, which is based on Ubuntu LTS
5+
6+
if [ "${LIMA_CIDATA_NAME}" = "default" ] && command -v patch >/dev/null 2>&1 && grep -q color_prompt "/home/${LIMA_CIDATA_USER}.linux/.bashrc"; then
57

68
! grep -q "^# Lima PS1" "/home/${LIMA_CIDATA_USER}.linux/.bashrc" || exit 0
79

0 commit comments

Comments
 (0)