Skip to content

Commit 8ceab1a

Browse files
committed
fix(check): filter config files
Avoids error when `--config` is not provided.
1 parent c3257c3 commit 8ceab1a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/emmylua_check/src/init.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ pub fn load_workspace(
5050
vec![
5151
main_path.join(".luarc.json"),
5252
main_path.join(".emmyrc.json"),
53-
],
53+
]
54+
.into_iter()
55+
.filter(|path| path.exists())
56+
.collect(),
5457
main_path.clone(),
5558
)
5659
};

0 commit comments

Comments
 (0)