From 30bc3732c39cbb14faa8f7caf0c9206f6a401008 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 25 May 2025 17:01:10 +0100 Subject: init.sh: error out if .git/ is a symlink the current behaviour is a relic from the older lbmk design, before recent auditing. the current logic would cause xbmk to continue execution, going into a child process with .git/ being a symlink. The .git/ directory should never be a symlink, because it is extremely error-prone. Signed-off-by: Leah Rowe --- include/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/init.sh') diff --git a/include/init.sh b/include/init.sh index 38eb1c81..9265bf45 100644 --- a/include/init.sh +++ b/include/init.sh @@ -195,7 +195,7 @@ xbmk_git_init() || err "Run this first: $gitcmd \"your ${gitcmd##*.}\"" done - [ -L ".git" ] && return 1 + [ -L ".git" ] && err "'$xbmkpwd/.git' is a symlink" [ -e ".git" ] && return 0 eval "`setvars "$(date -Rud @$versiondate)" cdate _nogit`" -- cgit v1.2.1