summaryrefslogtreecommitdiff
path: root/buildstream/_project.py
diff options
context:
space:
mode:
authorTiago Gomes <tiago.avv@gmail.com>2018-08-02 12:10:29 +0000
committerTiago Gomes <tiago.avv@gmail.com>2018-08-02 12:10:29 +0000
commit8656a65d21bd002b1fd490481e736f1748e8db86 (patch)
treea54839da778fc48c22fac07c4d64fa8dc7e3ed93 /buildstream/_project.py
parent039d43e43431957a42193f12f06acb7b95c2eae4 (diff)
parent9f0c8fcfe348533987ec128b85356655edae77f4 (diff)
downloadbuildstream-8656a65d21bd002b1fd490481e736f1748e8db86.tar.gz
Merge branch 'tiagogomes/issue-195' into 'master'Qinusty/490-artifact-cache-interactivity
Add validation for project paths See merge request BuildStream/buildstream!593
Diffstat (limited to 'buildstream/_project.py')
-rw-r--r--buildstream/_project.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/buildstream/_project.py b/buildstream/_project.py
index 1c30fb9bb..3ac562836 100644
--- a/buildstream/_project.py
+++ b/buildstream/_project.py
@@ -16,6 +16,7 @@
#
# Authors:
# Tristan Van Berkom <tristan.vanberkom@codethink.co.uk>
+# Tiago Gomes <tiago.gomes@codethink.co.uk>
import os
import multiprocessing # for cpu_count()
@@ -291,7 +292,8 @@ class Project():
self.element_path = os.path.join(
self.directory,
- _yaml.node_get(config, str, 'element-path')
+ _yaml.node_get_project_path(config, 'element-path', self.directory,
+ check_is_dir=True)
)
# Load project options
@@ -500,8 +502,11 @@ class Project():
if group in origin_dict:
del origin_dict[group]
if origin_dict['origin'] == 'local':
+ path = _yaml.node_get_project_path(origin, 'path',
+ self.directory,
+ check_is_dir=True)
# paths are passed in relative to the project, but must be absolute
- origin_dict['path'] = os.path.join(self.directory, origin_dict['path'])
+ origin_dict['path'] = os.path.join(self.directory, path)
destination.append(origin_dict)
# _ensure_project_dir()