From 6969a5e01dd4b15476401218a7070ccda5993d3c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sun, 30 Jun 2024 15:15:52 +0200 Subject: [PATCH] [libcalamares] log-as-you-go for verbose commands --- src/libcalamares/utils/CommandList.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libcalamares/utils/CommandList.cpp b/src/libcalamares/utils/CommandList.cpp index 39254ec05..b976c7928 100644 --- a/src/libcalamares/utils/CommandList.cpp +++ b/src/libcalamares/utils/CommandList.cpp @@ -261,6 +261,12 @@ CommandList::run() Calamares::Utils::Runner runner( shell_cmd ); runner.setLocation( location ).setTimeout( timeout ).setWorkingDirectory( QString() ); + if ( i->isVerbose() ) + { + runner.enableOutputProcessing(); + QObject::connect( + &runner, &Calamares::Utils::Runner::output, []( QString output ) { cDebug() << output; } ); + } ProcessResult r = runner.run(); if ( r.getExitCode() != 0 )