summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2019-02-08 11:49:51 +0000
committerJonathan Maw <jonathan.maw@codethink.co.uk>2019-02-12 16:44:35 +0000
commit62396af999bc19228035cdc08ec4d3de904d31a2 (patch)
tree119035fb8595442dc45cddeb1475d9e81a5d6681
parent352f4ad9a360ca4f8f3a0b7a68106d0131eeb374 (diff)
downloadbuildstream-62396af999bc19228035cdc08ec4d3de904d31a2.tar.gz
loader.py: Load junction from workspace if one's open
-rw-r--r--buildstream/_loader/loader.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/buildstream/_loader/loader.py b/buildstream/_loader/loader.py
index d5dea7034..238bd9e9d 100644
--- a/buildstream/_loader/loader.py
+++ b/buildstream/_loader/loader.py
@@ -540,7 +540,12 @@ class Loader():
"Subproject has no ref for junction: {}".format(filename),
detail=detail)
- if len(sources) == 1 and sources[0]._get_local_path():
+ workspace = element._get_workspace()
+ if workspace:
+ # If a workspace is open, load it from there instead
+ basedir = workspace.get_absolute_path()
+ tempdir = None
+ elif len(sources) == 1 and sources[0]._get_local_path():
# Optimization for junctions with a single local source
basedir = sources[0]._get_local_path()
tempdir = None