shutdown: make sure we capture the output of journalctl -b

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
This commit is contained in:
Olivier Gayot 2023-08-03 12:03:16 +02:00
parent 6a4537277d
commit 34242846db
1 changed files with 4 additions and 1 deletions

View File

@ -120,7 +120,10 @@ class ShutdownController(SubiquityController):
try:
with open_perms(journal_txt) as output:
await self.app.command_runner.run(
["journalctl", "-b"], stdout=output, stderr=subprocess.STDOUT
["journalctl", "-b"],
capture=True,
stdout=output,
stderr=subprocess.STDOUT,
)
except Exception:
log.exception("saving journal failed")