Skip to content

Commit 62b6e8d

Browse files
committed
fix(cli): use has_vite_plus_dependency for dependency check
1 parent 01bcb18 commit 62b6e8d

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

crates/vite_global_cli/src/cli.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ use crate::{
2020
},
2121
error::Error,
2222
help,
23-
js_executor::JsExecutor,
2423
};
2524

2625
#[derive(Clone, Copy, Debug)]
@@ -1491,7 +1490,7 @@ fn run_tasks_completions(current: &OsStr) -> Vec<clap_complete::CompletionCandid
14911490
let Some(cwd) = std::env::current_dir()
14921491
.ok()
14931492
.and_then(AbsolutePathBuf::new)
1494-
.filter(|p| JsExecutor::resolve_local_vite_plus(p).is_some())
1493+
.filter(|p| commands::has_vite_plus_dependency(p))
14951494
else {
14961495
return vec![];
14971496
};

crates/vite_global_cli/src/js_executor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ impl JsExecutor {
326326
}
327327

328328
/// Resolve the local vite-plus package's `dist/bin.js` from the project directory.
329-
pub fn resolve_local_vite_plus(project_path: &AbsolutePath) -> Option<AbsolutePathBuf> {
329+
fn resolve_local_vite_plus(project_path: &AbsolutePath) -> Option<AbsolutePathBuf> {
330330
use oxc_resolver::{ResolveOptions, Resolver};
331331

332332
let resolver = Resolver::new(ResolveOptions {

0 commit comments

Comments
 (0)