From 0df703bef6ce44d066237003bfa5714542827ba5 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@collabora.com> Date: Tue, 19 May 2020 15:23:19 +0100 Subject: [PATCH] wrap-interactive: Fix display of pressure-vessel-wrap's name Use its own name, and not the first word of the command we executed or would have executed. Signed-off-by: Simon McVittie <smcv@collabora.com> --- src/wrap-interactive.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wrap-interactive.c b/src/wrap-interactive.c index 946f3a98e..9628412ca 100644 --- a/src/wrap-interactive.c +++ b/src/wrap-interactive.c @@ -54,7 +54,7 @@ pv_bwrap_wrap_interactive (FlatpakBwrap *wrapped_command, "echo\n" "echo\n" "echo\n" - "echo \"$1: Starting interactive shell (original command is in " + "echo \"$prgname: Starting interactive shell (original command is in " "\\\"\\$@\\\")\"\n" "echo\n" "echo\n" @@ -86,7 +86,7 @@ pv_bwrap_wrap_interactive (FlatpakBwrap *wrapped_command, case PV_SHELL_FAIL: script = "if \"$@\"; then exit 0; else e=\"$?\"; fi\n" - "echo \"$1: command exit status $e\"\n"; + "echo \"$prgname: command exit status $e\"\n"; break; case PV_SHELL_INSTEAD: @@ -105,9 +105,9 @@ pv_bwrap_wrap_interactive (FlatpakBwrap *wrapped_command, "sh", "-euc", command, "sh", /* $0 for sh */ - g_get_prgname (), /* $1 for sh */ + g_get_prgname (), /* $1 = $prgname for sh */ /* Original command will go here and become - * the argv of command, and eventually + * the rest of the argv of command, and eventually * the argv of bash -i -s */ NULL); } -- GitLab