Skip to content
Snippets Groups Projects
Commit 9677bfe0 authored by Simon McVittie's avatar Simon McVittie
Browse files

Merge branch 'wip/smcv/trivia' into 'master'

Minor pressure-vessel-wrap fixes

See merge request steam/pressure-vessel!44
parents 387a7242 f4df3ac4
No related branches found
No related tags found
No related merge requests found
...@@ -297,7 +297,9 @@ pv_runtime_finalize (GObject *object) ...@@ -297,7 +297,9 @@ pv_runtime_finalize (GObject *object)
g_free (self->runtime_usr); g_free (self->runtime_usr);
g_free (self->source_files); g_free (self->source_files);
g_free (self->tools_dir); g_free (self->tools_dir);
pv_bwrap_lock_free (self->runtime_lock);
if (self->runtime_lock != NULL)
pv_bwrap_lock_free (self->runtime_lock);
G_OBJECT_CLASS (pv_runtime_parent_class)->finalize (object); G_OBJECT_CLASS (pv_runtime_parent_class)->finalize (object);
} }
......
...@@ -54,7 +54,7 @@ pv_bwrap_wrap_interactive (FlatpakBwrap *wrapped_command, ...@@ -54,7 +54,7 @@ pv_bwrap_wrap_interactive (FlatpakBwrap *wrapped_command,
"echo\n" "echo\n"
"echo\n" "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" "\\\"\\$@\\\")\"\n"
"echo\n" "echo\n"
"echo\n" "echo\n"
...@@ -72,6 +72,7 @@ pv_bwrap_wrap_interactive (FlatpakBwrap *wrapped_command, ...@@ -72,6 +72,7 @@ pv_bwrap_wrap_interactive (FlatpakBwrap *wrapped_command,
"e=0\n" "e=0\n"
"\"$@\" || e=$?\n" "\"$@\" || e=$?\n"
"echo\n" "echo\n"
"echo \"$prgname: command exit status $e\"\n"
"echo \"Press Enter or ^D to continue...\"\n" "echo \"Press Enter or ^D to continue...\"\n"
"read reply || true\n" "read reply || true\n"
"exit \"$e\"\n"; "exit \"$e\"\n";
...@@ -80,13 +81,14 @@ pv_bwrap_wrap_interactive (FlatpakBwrap *wrapped_command, ...@@ -80,13 +81,14 @@ pv_bwrap_wrap_interactive (FlatpakBwrap *wrapped_command,
case PV_SHELL_AFTER: case PV_SHELL_AFTER:
script = script =
"e=0\n" "e=0\n"
"\"$@\" || e=$?\n"; "\"$@\" || e=$?\n"
"echo \"$prgname: command exit status $e\"\n";
break; break;
case PV_SHELL_FAIL: case PV_SHELL_FAIL:
script = script =
"if \"$@\"; then exit 0; else e=\"$?\"; fi\n" "if \"$@\"; then exit 0; else e=\"$?\"; fi\n"
"echo \"$1: command exit status $e\"\n"; "echo \"$prgname: command exit status $e\"\n";
break; break;
case PV_SHELL_INSTEAD: case PV_SHELL_INSTEAD:
...@@ -105,9 +107,9 @@ pv_bwrap_wrap_interactive (FlatpakBwrap *wrapped_command, ...@@ -105,9 +107,9 @@ pv_bwrap_wrap_interactive (FlatpakBwrap *wrapped_command,
"sh", "-euc", "sh", "-euc",
command, command,
"sh", /* $0 for sh */ "sh", /* $0 for sh */
g_get_prgname (), /* $1 for sh */ g_get_prgname (), /* $1 = $prgname for sh */
/* Original command will go here and become /* 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 */ * the argv of bash -i -s */
NULL); NULL);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment