summaryrefslogtreecommitdiff
path: root/src/buildstream/_context.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildstream/_context.py')
-rw-r--r--src/buildstream/_context.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/buildstream/_context.py b/src/buildstream/_context.py
index c0e92b98e..8b559153e 100644
--- a/src/buildstream/_context.py
+++ b/src/buildstream/_context.py
@@ -233,11 +233,14 @@ class Context:
# Load default config
#
- defaults = _yaml.load(_site.default_user_config)
+ defaults = _yaml.load(_site.default_user_config, shortname="userconfig.yaml")
if config:
self.config_origin = os.path.abspath(config)
- user_config = _yaml.load(config)
+
+ # Here we use the fullpath as the shortname as well, as it is useful to have
+ # a fullpath displayed in errors for the user configuration
+ user_config = _yaml.load(config, shortname=config)
user_config._composite(defaults)
# Give obsoletion warnings