Skip to content

Commit b9647c8

Browse files
authored
Merge pull request #518 from lewis6991/fix/check342432
emmylua_check fixes
2 parents c3257c3 + feab9e3 commit b9647c8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

crates/emmylua_check/src/init.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use emmylua_code_analysis::{
55
};
66

77
fn root_from_configs(config_paths: &Vec<PathBuf>, fallback: &PathBuf) -> PathBuf {
8-
if config_paths.len() > 1 {
8+
if config_paths.len() != 1 {
99
fallback.clone()
1010
} else {
1111
let config_path = &config_paths[0];
@@ -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)