Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
steam-runtime-tools
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
steamrt
steam-runtime-tools
Commits
65fdc5f2
Commit
65fdc5f2
authored
6 years ago
by
Simon McVittie
Browse files
Options
Downloads
Patches
Plain Diff
wrap: Defend against arrays with empty values
Signed-off-by:
Simon McVittie
<
smcv@collabora.com
>
parent
46b5570c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pressure-vessel-wrap
+4
-4
4 additions, 4 deletions
pressure-vessel-wrap
with
4 additions
and
4 deletions
pressure-vessel-wrap
+
4
−
4
View file @
65fdc5f2
...
@@ -292,7 +292,7 @@ if [ -z "$BWRAP" ] || ! "$BWRAP" --bind / / true; then
...
@@ -292,7 +292,7 @@ if [ -z "$BWRAP" ] || ! "$BWRAP" --bind / / true; then
echo
"
$me
: Falling back to executing '
${
wrapped_command
[*]
}
' directly"
>
&2
echo
"
$me
: Falling back to executing '
${
wrapped_command
[*]
}
' directly"
>
&2
exec env
--
"
${
env_if_host
[@]
}
"
"
${
wrapped_command
[@]
}
"
exec env
--
${
env_if_host
+
"
${
env_if_host
[@]
}
"
}
"
${
wrapped_command
[@]
}
"
fi
fi
if
"
$BWRAP
"
--help
2>&1 |
grep
-F
'[--]'
>
/dev/null 2>/dev/null
;
then
if
"
$BWRAP
"
--help
2>&1 |
grep
-F
'[--]'
>
/dev/null 2>/dev/null
;
then
...
@@ -688,7 +688,7 @@ fi
...
@@ -688,7 +688,7 @@ fi
# used for them, which might be their physical rather than logical
# used for them, which might be their physical rather than logical
# locations
# locations
adjusted_ld_preload
=
adjusted_ld_preload
=
for
preload
in
"
${
ld_preload
[@]
}
"
;
do
for
preload
in
${
ld_preload
+
"
${
ld_preload
[@]
}
"
}
;
do
# Currently the only preloaded modules we support are ones that come
# Currently the only preloaded modules we support are ones that come
# from the host.
# from the host.
preload
=
"
${
preload
#host
:
}
"
preload
=
"
${
preload
#host
:
}
"
...
@@ -757,7 +757,7 @@ fi
...
@@ -757,7 +757,7 @@ fi
if
[
-z
"
$runtime
"
]
;
then
if
[
-z
"
$runtime
"
]
;
then
# We need libraries from the Steam Runtime, so make sure that's visible
# We need libraries from the Steam Runtime, so make sure that's visible
# (it should never need to be read/write though)
# (it should never need to be read/write though)
for
env
in
"
${
env_if_host
[@]
}
"
;
do
for
env
in
${
env_if_host
+
"
${
env_if_host
[@]
}
"
}
;
do
case
"
$env
"
in
case
"
$env
"
in
(
STEAM_RUNTIME
=
/
*
)
(
STEAM_RUNTIME
=
/
*
)
value
=
"
${
env
#STEAM_RUNTIME=
}
"
value
=
"
${
env
#STEAM_RUNTIME=
}
"
...
@@ -766,7 +766,7 @@ if [ -z "$runtime" ]; then
...
@@ -766,7 +766,7 @@ if [ -z "$runtime" ]; then
esac
esac
done
done
wrapped_command
=(
env
--
"
${
env_if_host
[@]
}
"
"
${
wrapped_command
[@]
}
"
)
wrapped_command
=(
env
--
${
env_if_host
+
"
${
env_if_host
[@]
}
"
}
"
${
wrapped_command
[@]
}
"
)
fi
fi
# Replace this process with bwrap, which replaces itself with the
# Replace this process with bwrap, which replaces itself with the
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment