Skip to content

Commit

Permalink
chore: add panic message (#7316)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Mar 5, 2024
1 parent 3dfa43b commit 381d76c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/cli/src/opts/build/paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,14 @@ impl ProjectPathsArgs {
/// Returns the root directory to use for configuring the [Project]
///
/// This will be the `--root` argument if provided, otherwise see [find_project_root_path()]
///
/// # Panics
///
/// If the project root directory cannot be found: [find_project_root_path()]
pub fn project_root(&self) -> PathBuf {
self.root.clone().unwrap_or_else(|| find_project_root_path(None).unwrap())
self.root
.clone()
.unwrap_or_else(|| find_project_root_path(None).expect("Failed to find project root"))
}

/// Returns the remappings to add to the config
Expand Down

0 comments on commit 381d76c

Please sign in to comment.