Improve soundness
This commit is contained in:
parent
cd76558dff
commit
38fe58ea9b
1 changed files with 2 additions and 2 deletions
|
@ -27,14 +27,14 @@ impl DokkuApp {
|
|||
return None;
|
||||
}
|
||||
|
||||
let current_vhosts = read_to_string(&vhost_path).await.unwrap();
|
||||
let current_vhosts = read_to_string(&vhost_path).await.ok()?;
|
||||
|
||||
if current_vhosts.is_empty() {
|
||||
return None;
|
||||
}
|
||||
|
||||
Some(DokkuApp {
|
||||
name: String::from(path.file_name().unwrap().to_str().unwrap()),
|
||||
name: String::from(path.file_name()?.to_str()?),
|
||||
hosts: current_vhosts.lines().map(String::from).collect(),
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue