Files
qt-creator/qbs/imports/QtcProcessOutputReader/procoutputreader.js

12 lines
277 B
JavaScript
Raw Normal View History

var Process = loadExtension("qbs.Process")
function readOutput(executable, args)
{
var p = new Process();
var output = "";
if (p.exec(executable, args, false) !== -1)
output = p.readStdOut().trim(); // Trailing newline.
p.close();
return output;
}