When using --project-from-cwd a project is only activated if an associated git repo is identified. The same logic does not apply to activate_project in general, meaning through that path a projet can be activated and registered in the home dir, project subdirectories etc. This can have serious downsides, even though it can be considered a usage error. The message on project activation in hooks makes such usage errors more probable.
We can consider adding guards against that, similar to the logic in --project-from-cwd
When using
--project-from-cwda project is only activated if an associated git repo is identified. The same logic does not apply to activate_project in general, meaning through that path a projet can be activated and registered in the home dir, project subdirectories etc. This can have serious downsides, even though it can be considered a usage error. The message on project activation in hooks makes such usage errors more probable.We can consider adding guards against that, similar to the logic in
--project-from-cwd