mirror of
https://github.com/zellij-org/zellij.git
synced 2024-12-26 18:55:26 +03:00
fix: update to output error when using --layout
(#1413)
This commit is contained in:
parent
f04e5bd873
commit
8c38b39ef6
@ -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…
Reference in New Issue
Block a user