From 12a12a2a450d90e572397cc7bafe5783ad250559 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 26 Mar 2024 20:34:12 +0200 Subject: [PATCH] Improve calling conan. Catching exception gives feedback in case of errors. --- qbs/imports/conan/ConanfileProbe.qbs | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/qbs/imports/conan/ConanfileProbe.qbs b/qbs/imports/conan/ConanfileProbe.qbs index 87dc1c999..42fbc18b7 100644 --- a/qbs/imports/conan/ConanfileProbe.qbs +++ b/qbs/imports/conan/ConanfileProbe.qbs @@ -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"))