summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-04-26 21:17:23 +0100
committerLeah Rowe <leah@libreboot.org>2025-04-26 21:18:59 +0100
commita0e1d42ff74ab3191b88818c6ad8220ebbc1afc4 (patch)
treee22f65f706b6d067c20c917ddacb8e741c0407a6
parenta8f0623efbb4d0ac9514f7a76af485a759b502fa (diff)
init.sh: Provide more complete error info
On initialisation of the child instance, ./mk is executed, but an error from it won't reveal what command was actually executed. This change makes that the case, since x_ does print the command that caused an error. This is useful for debugging. However, we don't want x_ to cause a real exit, because we still need to handle the lock file from the parent instance. Therefore, the first child instance is executed inside a subshell, and xbmk_rval is set if that subshell returns non-zero. Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--include/init.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/init.sh b/include/init.sh
index 2e60883d..c9be7e0c 100644
--- a/include/init.sh
+++ b/include/init.sh
@@ -205,7 +205,7 @@ xbmk_child_init()
) || $err "Can't set up python symlink in $XBMK_CACHE/xbmkpath"
xbmk_rval=0
- ./mk "$@" || xbmk_rval=1
+ ( x_ ./mk "$@" ) || xbmk_rval=1
rm -Rf "$xbmktmp" || xbmk_rval=1
rm -f lock || xbmk_rval=1
exit $xbmk_rval