File tree Expand file tree Collapse file tree
crates/vite_global_cli/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -210,11 +210,14 @@ impl JsExecutor {
210210 args : & [ String ] ,
211211 ) -> Result < ExitStatus , Error > {
212212 // Try to resolve vite-plus from the project directory using oxc_resolver
213- let entry_point = Self :: resolve_local_vite_plus ( project_path) . unwrap_or_else ( || {
214- // Fall back to the global installation's bin.js
215- let scripts_dir = self . get_scripts_dir ( ) . expect ( "scripts dir not found" ) ;
216- scripts_dir. join ( "bin.js" )
217- } ) ;
213+ let entry_point = match Self :: resolve_local_vite_plus ( project_path) {
214+ Some ( path) => path,
215+ None => {
216+ // Fall back to the global installation's bin.js
217+ let scripts_dir = self . get_scripts_dir ( ) ?;
218+ scripts_dir. join ( "bin.js" )
219+ }
220+ } ;
218221
219222 tracing:: debug!( "Delegating to CLI via JS entry point: {:?} {:?}" , entry_point, args) ;
220223
You can’t perform that action at this time.
0 commit comments