@@ -12,7 +12,7 @@ use vite_path::AbsolutePath;
1212use vite_str:: Str ;
1313use vite_task:: {
1414 Command , EnabledCacheConfig , HandledCommand , ScriptCommand , SessionCallbacks , UserCacheConfig ,
15- UserTaskOptions , get_path_env, plan_request:: SyntheticPlanRequest ,
15+ get_path_env, plan_request:: SyntheticPlanRequest ,
1616} ;
1717
1818#[ derive( Debug , Default ) ]
@@ -48,7 +48,10 @@ fn synthesize_node_modules_bin_task(
4848 Ok ( SyntheticPlanRequest {
4949 program : find_executable ( get_path_env ( envs) , & * cwd, executable_name) ?,
5050 args : args. into ( ) ,
51- task_options : Default :: default ( ) ,
51+ cache_config : UserCacheConfig :: with_config ( EnabledCacheConfig {
52+ envs : None ,
53+ pass_through_envs : None ,
54+ } ) ,
5255 envs : Arc :: clone ( envs) ,
5356 } )
5457}
@@ -108,16 +111,9 @@ impl vite_task::CommandHandler for CommandHandler {
108111 Ok ( HandledCommand :: Synthesized ( SyntheticPlanRequest {
109112 program : find_executable ( get_path_env ( & envs) , & * command. cwd , "print-env" ) ?,
110113 args : [ name. clone ( ) ] . into ( ) ,
111- task_options : UserTaskOptions {
112- cache_config : UserCacheConfig :: Enabled {
113- cache : None ,
114- enabled_cache_config : EnabledCacheConfig {
115- envs : None ,
116- pass_through_envs : Some ( vec ! [ name] ) ,
117- } ,
118- } ,
119- ..Default :: default ( )
120- } ,
114+ cache_config : UserCacheConfig :: with_config ( {
115+ EnabledCacheConfig { envs : None , pass_through_envs : Some ( vec ! [ name] ) }
116+ } ) ,
121117 envs : Arc :: new ( envs) ,
122118 } ) )
123119 }
0 commit comments