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 21, 2024
1 parent 3ff5d52 commit 5a23158
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 @@ -2435,6 +2435,10 @@ def _load_project(self, pd: Dict, url_bases: Dict[str, str],
f'normalizes to {ret_norm}, which escapes '
f'the workspace topdir')

if Path(ret_norm).parts[0] == 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 5a23158

Please sign in to comment.