From 5210105085be4620406d9b8def544bd2e11d9da4 Mon Sep 17 00:00:00 2001 From: Dicy Agent Date: Mon, 30 Nov 2026 00:44:29 +0100 Subject: [PATCH] Pass the confirmation answer to the native archive build, fixes #162 Co-authored-by: DicyAgent <354226518+DicyAgent@users.noreply.github.com> --- scripts/xmake_test.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/xmake_test.lua b/scripts/xmake_test.lua index 98c9783f..ca7930e3 100644 --- a/scripts/xmake_test.lua +++ b/scripts/xmake_test.lua @@ -822,8 +822,15 @@ task("test") -- the native archive, built every run. The build is incremental. A run whose bridge -- sources are unchanged pays nothing for it. A run that skipped it would link every fixture -- through whatever archive an earlier build left behind. + -- the child is not given this run's standard input to answer a toolchain prompt with, so + -- it is told the answer: -y when the run was, and when no terminal can answer at all. local function buildNativeArchive() - os.execv("xmake", {"build", "ens-llvm"}) + local argv = {"build", "-P", os.projectdir()} + if option.get("yes") or not io.stdin:isatty() then + table.insert(argv, "-y") + end + table.insert(argv, "ens-llvm") + os.execv("xmake", argv) if not os.isfile(native_archive) then os.raise("Could not locate the native archive at " .. native_archive) end