From 10259923ce66a2a3a482b196e4f87a6a223e4e37 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Fri, 27 Apr 2018 17:26:11 +0100
Subject: [PATCH] Set up end-of-options correctly

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 pressure-vessel-wrap | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pressure-vessel-wrap b/pressure-vessel-wrap
index cf786580a..b5a585b8c 100755
--- a/pressure-vessel-wrap
+++ b/pressure-vessel-wrap
@@ -228,6 +228,8 @@ if [ -z "$fake_home" ]; then
     fi
 fi
 
+set -- $bwrap_end_of_options "$@"
+
 # Because this is a shell script, we only have access to one array, which
 # is $@; so we need to build up the bwrap command line backwards, with
 # "wider" mount points like / coming after "narrower" mount points
@@ -358,6 +360,6 @@ if [ -n "$verbose" ]; then
     echo "$me: '$BWRAP $*'" >&2
 fi
 
-exec "$BWRAP" $bwrap_end_of_options "$@" || e=$?
+exec "$BWRAP" "$@" || e=$?
 echo "$me: failed to execute '$BWRAP $*': exec status $e" >&2
 exit "$e"
-- 
GitLab