From 3539a4ddd9f6b326e049a8971e1b1d90a53da811 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@collabora.com> Date: Thu, 24 Jan 2019 19:19:48 +0000 Subject: [PATCH] pressure-vessel-wrap: Detect support for "bwrap --" correctly For some reason bwrap writes its usage message to stderr, even though the rest of the help goes to stdout. Signed-off-by: Simon McVittie <smcv@collabora.com> --- pressure-vessel-wrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pressure-vessel-wrap b/pressure-vessel-wrap index aa4affb83..6f2b87a42 100755 --- a/pressure-vessel-wrap +++ b/pressure-vessel-wrap @@ -326,7 +326,7 @@ if [ -z "$BWRAP" ] || ! "$BWRAP" --bind / / true; then exec "${wrapped_command[@]}" fi -if "$BWRAP" --help | grep -F '[--]' 2>/dev/null; then +if "$BWRAP" --help 2>&1 | grep -F '[--]' >/dev/null 2>/dev/null; then bwrap_end_of_options="--" else # bwrap doesn't support the -- syntax -- GitLab