Skip to content

Commit c56b908

Browse files
committed
[IMP] do not keep empty string for invalid additional stubs
1 parent 047592d commit c56b908

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/cli_backend.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl CliBackend {
5757
config.odoo_path = Some(fs::canonicalize(community_path.unwrap_or(S!(""))).unwrap_or_else(|_| PathBuf::from(S!(""))).sanitize());
5858
config.diag_missing_imports = DiagMissingImportsMode::All;
5959
config.no_typeshed_stubs = self.cli.no_typeshed_stubs;
60-
config.additional_stubs = self.cli.stubs.clone().unwrap_or(vec![]).into_iter().map(|p| fs::canonicalize(p).unwrap_or_else(|_| PathBuf::from(S!(""))).sanitize()).collect();
60+
config.additional_stubs = self.cli.stubs.clone().unwrap_or(vec![]).into_iter().map(|p| fs::canonicalize(p).unwrap_or_else(|_| PathBuf::from(S!(""))).sanitize()).filter(|x| !x.is_empty()).collect();
6161
config.stdlib = self.cli.stdlib.clone().map(|p| fs::canonicalize(p).unwrap_or_else(|_| PathBuf::from(S!(""))).sanitize()).unwrap_or(S!(""));
6262
config.python_path = self.cli.python.clone().unwrap_or(get_python_command().unwrap_or(S!("")));
6363
SyncOdoo::init(&mut session, config);

0 commit comments

Comments
 (0)