diff options
author | Jürg Billeter <j@bitron.ch> | 2018-10-02 07:08:35 +0000 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2018-10-02 07:08:35 +0000 |
commit | 0458bc4e6173e499d6d3be4f46e5484331f411b6 (patch) | |
tree | 9575461f14aa81256bdf9d44a60b45f469cd431c | |
parent | cf00c0a1317dddbab08859dd02c41b38eb35b9b9 (diff) | |
parent | 5f4ae90bf3a91738075e98b27cf9f0049370868d (diff) | |
download | buildstream-0458bc4e6173e499d6d3be4f46e5484331f411b6.tar.gz |
Merge branch 'juerg/sandbox' into 'master'
sandbox/_sandboxremote.py: Use helpers to set up cwd and env
See merge request BuildStream/buildstream!841
-rw-r--r-- | buildstream/sandbox/_sandboxremote.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/buildstream/sandbox/_sandboxremote.py b/buildstream/sandbox/_sandboxremote.py index d934832bb..ab0c31bff 100644 --- a/buildstream/sandbox/_sandboxremote.py +++ b/buildstream/sandbox/_sandboxremote.py @@ -177,15 +177,11 @@ class SandboxRemote(Sandbox): if not cascache.verify_digest_pushed(self._get_project(), upload_vdir.ref): raise SandboxError("Failed to verify that source has been pushed to the remote artifact cache.") - # Set up environment and working directory - if cwd is None: - cwd = self._get_work_directory() - - if cwd is None: - cwd = '/' - - if env is None: - env = self._get_environment() + # Fallback to the sandbox default settings for + # the cwd and env. + # + cwd = self._get_work_directory(cwd=cwd) + env = self._get_environment(cwd=cwd, env=env) # We want command args as a list of strings if isinstance(command, str): |