fix: remove unwrap

This commit is contained in:
daimond113 2024-08-27 19:49:11 +02:00
parent 8168bb5124
commit fd69ced633
No known key found for this signature in database
GPG key ID: 3A8ECE51328B513C

View file

@ -75,7 +75,11 @@ fn run() -> anyhow::Result<()> {
break 'finder project_root;
}
project_root = project_root.parent().unwrap().to_path_buf();
if let Some(parent) = project_root.parent() {
project_root = parent.to_path_buf();
} else {
break;
}
}
cwd.clone()