From 62396af999bc19228035cdc08ec4d3de904d31a2 Mon Sep 17 00:00:00 2001 From: Jonathan Maw Date: Fri, 8 Feb 2019 11:49:51 +0000 Subject: loader.py: Load junction from workspace if one's open --- buildstream/_loader/loader.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1