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

wrap: Only rewrite environment variables if they really changed


A reasonably common case is that the value on the host and in the
container will be the same.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent b2f6d15b
No related branches found
No related tags found
No related merge requests found
...@@ -258,8 +258,12 @@ bind_and_propagate_from_environ (const char *variable, ...@@ -258,8 +258,12 @@ bind_and_propagate_from_environ (const char *variable,
* instead, and then create the same symlink in the container. */ * instead, and then create the same symlink in the container. */
flatpak_bwrap_add_args (bwrap, flatpak_bwrap_add_args (bwrap,
"--bind", value_host, value_host, "--bind", value_host, value_host,
"--setenv", variable, value_host,
NULL); NULL);
if (strcmp (value, value_host) != 0)
flatpak_bwrap_add_args (bwrap,
"--setenv", variable, value_host,
NULL);
} }
/* Order matters here: root, steam and steambeta are or might be symlinks /* Order matters here: root, steam and steambeta are or might be symlinks
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment