Improve calling conan.

Catching exception gives feedback in case of errors.
This commit is contained in:
Roman Telezhynskyi 2024-03-26 20:34:12 +02:00
parent a829a2d2de
commit 12a12a2a45

View File

@ -122,25 +122,8 @@ Probe {
} }
var p = new Process(); var p = new Process();
p.start(executable, args); console.info("Start conan: " + executable + " " + args.join(" "));
while (!p.waitForFinished(500)) { p.exec(executable, args, true);
const output = p.readStdOut();
if (verbose && output) {
console.info(output);
}
}
while (!p.atEnd()) {
const output = p.readStdOut();
if (verbose && output) {
console.info(output);
}
}
if (p.exitCode()) {
const errorOutput = p.readStdErr();
p.close();
throw errorOutput;
}
p.close();
if (generators.contains("json")) { if (generators.contains("json")) {
if (!File.exists(generatedFilesPath + "/conanbuildinfo.json")) if (!File.exists(generatedFilesPath + "/conanbuildinfo.json"))