From e834f4dd27575ca428eef5fb357959e853aefb98 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 5 Jan 2018 16:32:06 -0500 Subject: [PATCH] scripts: Only append "run journalctl" message if using journal For the `ex container` case we don't log to the journal by default, so this message was misleading. Closes: #1181 Approved by: jlebon --- src/libpriv/rpmostree-scripts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libpriv/rpmostree-scripts.c b/src/libpriv/rpmostree-scripts.c index 9b1debeb..e0c88b53 100644 --- a/src/libpriv/rpmostree-scripts.c +++ b/src/libpriv/rpmostree-scripts.c @@ -323,7 +323,8 @@ run_script_in_bwrap_container (int rootfs_fd, if (!rpmostree_bwrap_run (bwrap, cancellable, error)) { - if (error) + /* If errors go to the journal, help the user/admin find them there */ + if (error && rpmostree_stdout_is_journal ()) { g_assert (*error); g_autofree char *errmsg = (*error)->message;