From 14701be788420dcd8b1ed4be0e031bc034627e9c Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Wed, 26 Feb 2020 11:14:50 -0500 Subject: [PATCH] status: Quote initramfs args if necessary E.g. if it contains spaces as is the case when one does `rpm-ostree initramfs --arg=-I --arg='/file1 /file2'`. --- src/app/rpmostree-builtin-status.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/rpmostree-builtin-status.c b/src/app/rpmostree-builtin-status.c index 8b38fc83..09dcd94a 100644 --- a/src/app/rpmostree-builtin-status.c +++ b/src/app/rpmostree-builtin-status.c @@ -856,7 +856,9 @@ print_one_deployment (RPMOSTreeSysroot *sysroot_proxy, for (char **iter = initramfs_args; iter && *iter; iter++) { - g_string_append (buf, *iter); + const char *arg = *iter; + g_autofree char *quoted = rpmostree_maybe_shell_quote (arg); + g_string_append (buf, quoted ?: arg); g_string_append_c (buf, ' '); } if (buf->len == 0) -- 2.24.1