From 43074636f522f06384dcb34a60b3a7e60535ff66 Mon Sep 17 00:00:00 2001 From: Alec Larson <1925840+aleclarson@users.noreply.github.com> Date: Fri, 6 Oct 2023 19:46:26 -0400 Subject: [PATCH] fix(cli): log `configure.script` output when exitCode is non-zero This makes it easier to debug an extension's `configure.script` when it fails. --- src/cli/cli.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/cli/cli.cc b/src/cli/cli.cc index b36c06b247..cd135c69f5 100644 --- a/src/cli/cli.cc +++ b/src/cli/cli.cc @@ -4657,7 +4657,13 @@ int main (const int argc, const char* argv[]) { } if (configure.size() > 0) { - auto output = replace(exec(configure + argvForward).output, "\n", " "); + SSC::ExecOutput result = exec(configure + argvForward); + if (result.exitCode != 0) { + log("ERROR: failed to configure extension: " + extension); + log(result.output); + exit(result.exitCode); + } + auto output = replace(result.output, "\n", " "); if (output.size() > 0) { for (const auto& source : parseStringList(output, ' ')) { sources.push_back(source);