Improve calling conan.
Catching exception gives feedback in case of errors.
This commit is contained in:
parent
a829a2d2de
commit
12a12a2a45
|
@ -122,25 +122,8 @@ Probe {
|
|||
}
|
||||
|
||||
var p = new Process();
|
||||
p.start(executable, args);
|
||||
while (!p.waitForFinished(500)) {
|
||||
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();
|
||||
console.info("Start conan: " + executable + " " + args.join(" "));
|
||||
p.exec(executable, args, true);
|
||||
|
||||
if (generators.contains("json")) {
|
||||
if (!File.exists(generatedFilesPath + "/conanbuildinfo.json"))
|
||||
|
|
Loading…
Reference in New Issue
Block a user