Skip to main content

find_project_root

Function find_project_root 

Source
pub fn find_project_root(start_dir: &Path) -> Option<ProjectRoot>
Expand description

Walk up from start_dir looking for a shape.toml file. Returns Some(ProjectRoot) if found, None otherwise.

If a shape.toml file is found but contains syntax errors, an error message is printed to stderr and None is returned. Use try_find_project_root when you need the error as a Result.