Skip to content

Commit

Permalink
fix(cli): log configure.script output when exitCode is non-zero
Browse files Browse the repository at this point in the history
This makes it easier to debug an extension's `configure.script` when it fails.
  • Loading branch information
aleclarson authored and jwerle committed Oct 7, 2023
1 parent 8d1cec7 commit 4307463
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/cli/cli.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4307463

Please sign in to comment.