summaryrefslogtreecommitdiff
path: root/include/init.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-05-25 17:01:10 +0100
committerLeah Rowe <leah@libreboot.org>2025-05-25 17:01:10 +0100
commit30bc3732c39cbb14faa8f7caf0c9206f6a401008 (patch)
treed709f0822ad87a14b65aa0a8b8fa84f471dac985 /include/init.sh
parent2493203ee53befbf46de0ff7908214b5e64033a8 (diff)
init.sh: error out if .git/ is a symlinkHEADmaster
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 <leah@libreboot.org>
Diffstat (limited to 'include/init.sh')
-rw-r--r--include/init.sh2
1 files changed, 1 insertions, 1 deletions
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`"