Skip to content

Commit

Permalink
feat: check if manifest path exists
Browse files Browse the repository at this point in the history
  • Loading branch information
blmaier committed Dec 29, 2024
1 parent 7fd1feb commit ceaac70
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/project/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ impl Project {
pub fn load_or_else_discover(manifest_path: Option<&Path>) -> miette::Result<Self> {
let project = match manifest_path {
Some(path) => {
if !path.exists() {
miette::bail!("manifest path does not exist at {}", path.to_string_lossy());
}
let path = if path.is_dir() {
&find_project_manifest(path).ok_or_else(|| {
miette::miette!(
Expand Down

0 comments on commit ceaac70

Please sign in to comment.