diff options
author | Phillip Smyth <phillipsmyth@Nexus-x240.dyn.ducie.codethink.co.uk> | 2018-06-18 14:34:39 +0100 |
---|---|---|
committer | Tristan van Berkom <tristan.vanberkom@codethink.co.uk> | 2019-08-04 14:11:13 -0400 |
commit | 0a457a720999ad6f3621020ef31f7fff9389fd5d (patch) | |
tree | 07f923db570b4c672c4ed0ee9c4b7215883a29a0 /buildstream/_frontend/widget.py | |
parent | b2a2c76b70d6ebf32506fb38a207d41bdfec7994 (diff) | |
download | buildstream-0a457a720999ad6f3621020ef31f7fff9389fd5d.tar.gz |
Implementing relative workspacestristan/bst-1/relative-workspaces
This fixes #191
A note has been added to NEWS explaining backwards
compatibility issues
Diffstat (limited to 'buildstream/_frontend/widget.py')
-rw-r--r-- | buildstream/_frontend/widget.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/buildstream/_frontend/widget.py b/buildstream/_frontend/widget.py index a772f3248..80fffd201 100644 --- a/buildstream/_frontend/widget.py +++ b/buildstream/_frontend/widget.py @@ -416,7 +416,9 @@ class LogLine(Widget): if "%{workspace-dirs" in format_: workspace = element._get_workspace() if workspace is not None: - path = workspace.path.replace(os.getenv('HOME', '/root'), '~') + path = workspace.get_absolute_path() + if path.startswith("~/"): + path = os.path.join(os.getenv('HOME', '/root'), path[2:]) line = p.fmt_subst(line, 'workspace-dirs', "Workspace: {}".format(path)) else: line = p.fmt_subst( |