1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-26 12:10:59 +01:00

before merging executeAndPrintShellCommand to runProgram

This commit is contained in:
Wouter den Breejen 2007-06-28 11:11:09 +00:00
parent 1c0b052243
commit 729933062b
2 changed files with 15 additions and 0 deletions

View file

@ -1069,6 +1069,18 @@ string trim(const string & s) {
*/
string runProgram_AndPrintOutput(Path program, bool searchPath, const Strings & args, const string outputPrefix)
{
string program_output = runProgram(program, true, args);
//Add the prefix on every line
//TODO
//Remove the trailing \n
size_t found = program_output.find_last_of("\n");
printMsg(lvlError, format("%1%") % program_output.substr(0,found));
}
void executeAndPrintShellCommand(const string & command, const string & commandName, const bool & captureOutput)
{
///////////////////////