fix: update to output error when using --layout (#1413)
This commit is contained in:
parent
f04e5bd873
commit
8c38b39ef6
1 changed files with 8 additions and 2 deletions
|
|
@ -260,8 +260,14 @@ impl LayoutFromYamlIntermediate {
|
|||
layout_dir: Option<&PathBuf>,
|
||||
) -> LayoutFromYamlIntermediateResult {
|
||||
match layout_dir {
|
||||
Some(dir) => Self::from_path(&dir.join(layout))
|
||||
.or_else(|_| LayoutFromYamlIntermediate::from_default_assets(layout)),
|
||||
Some(dir) => {
|
||||
let layout_path = &dir.join(layout);
|
||||
if layout_path.exists() {
|
||||
Self::from_path(layout_path)
|
||||
} else {
|
||||
LayoutFromYamlIntermediate::from_default_assets(layout)
|
||||
}
|
||||
}
|
||||
None => LayoutFromYamlIntermediate::from_default_assets(layout),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue