summaryrefslogtreecommitdiff
path: root/cli/lsp/config.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-07-05 17:53:09 -0400
committerGitHub <noreply@github.com>2024-07-05 17:53:09 -0400
commit80df9aec1db449e6cc0f4513103aa442b8d43de3 (patch)
treee5a36781b8b75253b4896a2cdfd46116fde5af71 /cli/lsp/config.rs
parentd4d3a3c54f5e26dec0cc79e273dc488f8a47f2b3 (diff)
refactor: move `FileCollector` to deno_config (#24433)
Diffstat (limited to 'cli/lsp/config.rs')
-rw-r--r--cli/lsp/config.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/cli/lsp/config.rs b/cli/lsp/config.rs
index 4b96511c0..3c360b683 100644
--- a/cli/lsp/config.rs
+++ b/cli/lsp/config.rs
@@ -1299,7 +1299,13 @@ impl ConfigData {
}
};
- let vendor_dir = config_file.as_ref().and_then(|c| c.vendor_dir_path());
+ let vendor_dir = config_file.as_ref().and_then(|c| {
+ if c.vendor() == Some(true) {
+ Some(c.specifier.to_file_path().ok()?.parent()?.join("vendor"))
+ } else {
+ None
+ }
+ });
// Load lockfile
let lockfile = config_file.as_ref().and_then(resolve_lockfile_from_config);