The current working directory check is only relevant if the current
working directory is used as a build source, which means it's also
handled by the second check so let's drop it.
def check_workspace_directory(config: Config) -> None:
wd = config.workspace_dir_or_default()
- if wd.is_relative_to(Path.cwd()):
- die(f"The workspace directory ({wd}) must be located outside the current working directory ({Path.cwd()})",
- hint="Use WorkspaceDirectory= to configure a different workspace directory")
-
for tree in config.build_sources:
if wd.is_relative_to(tree.source):
die(f"The workspace directory ({wd}) cannot be a subdirectory of any source directory ({tree.source})",