Skip to content

Fix warning when using an absolute path which exists inside the project

Currently, as it stands, if we specify an absolute pathway to something within our project, BuildStream will fail, see below:

 $ pwd
/home/jennis/project

 $ ls
elements  project.conf  some_file.txt

 $ cat elements/import_file.bst 
kind: import
sources:
- kind: local
  path: /home/jennis/project/some_file.txt

 $ bst build import_file.bst 
[--:--:--][][] START   Build
[--:--:--][][] START   Loading elements
[00:00:00][][] SUCCESS Loading elements
[--:--:--][][] START   Resolving elements
[00:00:00][][] FAILURE Resolving elements
[00:00:00][][] FAILURE Build


import_file.bst [line 4 column 8]: Specified path '/home/jennis/project/some_file.txt' must not lead outside of the project directory

The error message is incorrect as this path does not lead outside of the project

This patch ensures that we receive an appropriate error message.

Edited by James Ennis

Merge request reports

Loading