Skip to content

Commit

Permalink
manifest: Do not allow projects inside the west directory
Browse files Browse the repository at this point in the history
It's not allowed to have projects inside the .west directory,
add a check when parsing the manifest.

Signed-off-by: Pieter De Gendt <[email protected]>
  • Loading branch information
pdgendt committed Oct 14, 2024
1 parent afbb5c2 commit 21cb051
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/west/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2432,6 +2432,10 @@ def _load_project(self, pd: Dict, url_bases: Dict[str, str],
f'normalizes to {ret_norm}, which escapes '
f'the workspace topdir')

if os.path.commonpath([ret_norm, util.WEST_DIR]) != '':
self._malformed(f'project "{name}" path {ret.path} '
f'is in the {util.WEST_DIR} directory')

return ret

def _validate_project_groups(self, project_name: str,
Expand Down

0 comments on commit 21cb051

Please sign in to comment.