summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin David <valentin.david@codethink.co.uk>2018-07-07 15:57:01 +0200
committerValentin David <valentin.david@codethink.co.uk>2018-07-07 15:57:01 +0200
commit6716a56c4092e7b0162ff6f08f6d9c35e2b05a6f (patch)
treedc6ceba8c65e4bfaf9a95fa7976c059ec8b7be3d
parent6028168de6fc4bbf27b7e04c96a336d641536dc5 (diff)
downloadbuildstream-valentindavid/flatpak-demo.tar.gz
Inject environment to bwrap through its command linevalentindavid/flatpak-demo
-rw-r--r--buildstream/sandbox/_sandboxbwrap.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/buildstream/sandbox/_sandboxbwrap.py b/buildstream/sandbox/_sandboxbwrap.py
index 3a0645aae..a06856905 100644
--- a/buildstream/sandbox/_sandboxbwrap.py
+++ b/buildstream/sandbox/_sandboxbwrap.py
@@ -152,6 +152,9 @@ class SandboxBwrap(Sandbox):
gid = self._get_config().build_gid
bwrap_command += ['--uid', str(uid), '--gid', str(gid)]
+ for k, v in env.items():
+ bwrap_command += ['--setenv', k, v]
+
# Add the command
bwrap_command += command