diff options
author | Jim MacArthur <jim.macarthur@codethink.co.uk> | 2018-07-27 16:13:17 +0100 |
---|---|---|
committer | Jim MacArthur <jim.macarthur@codethink.co.uk> | 2018-08-01 13:07:33 +0100 |
commit | 02c6c84682af1d6ee4a27588105e15c599085850 (patch) | |
tree | fb3d5480e8566c79679d19f6874cfe01308ecd40 | |
parent | 8edf1f805f6ac2395d4e0f0efe60dc4e7dcb09fc (diff) | |
download | buildstream-jmac/virtual_directories.tar.gz |
sandbox.py: Use _root in _has_commandjmac/virtual_directories
This will need more attention when we bring in another virtual
directory backend, however, we've said it is acceptable for the
sandbox itself to access the underlying directory, and this is
the best fix in the meantime.
-rw-r--r-- | buildstream/sandbox/sandbox.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/buildstream/sandbox/sandbox.py b/buildstream/sandbox/sandbox.py index 80a309c0c..9fe1194bb 100644 --- a/buildstream/sandbox/sandbox.py +++ b/buildstream/sandbox/sandbox.py @@ -316,11 +316,11 @@ class Sandbox(): def _has_command(self, command, env=None): if os.path.isabs(command): return os.path.exists(os.path.join( - self.get_directory(), command.lstrip(os.sep))) + self._root, command.lstrip(os.sep))) for path in env.get('PATH').split(':'): if os.path.exists(os.path.join( - self.get_directory(), path.lstrip(os.sep), command)): + self._root, path.lstrip(os.sep), command)): return True return False |