@@ -64,7 +64,7 @@ async fn execute_code(
6464 let start_time = std:: time:: Instant :: now ( ) ;
6565 let mut _last_error: String = String :: new ( ) ;
6666
67- let cmd = plugin. get_command ( ) ;
67+ let cmd = plugin. get_command ( None ) ;
6868 let args = plugin. get_execute_args ( file_path. to_str ( ) . unwrap ( ) ) ;
6969 info ! (
7070 "执行代码 -> 调用插件 [ {} ] 执行命令 {} 携带参数 {}" ,
@@ -74,7 +74,7 @@ async fn execute_code(
7474 ) ;
7575
7676 let output = Command :: new ( & cmd)
77- . args ( & args)
77+ . args ( args)
7878 . stdout ( Stdio :: piped ( ) )
7979 . stderr ( Stdio :: piped ( ) )
8080 . output ( ) ;
@@ -142,7 +142,9 @@ async fn execute_code(
142142 request. language,
143143 request. language,
144144 _last_error,
145- plugin. get_command( ) . to_string( )
145+ plugin
146+ . get_command( Some ( file_path. to_str( ) . unwrap( ) ) )
147+ . to_string( )
146148 ) ,
147149 execution_time,
148150 timestamp,
@@ -172,7 +174,7 @@ async fn get_info(
172174 format ! ( "Pre-execution hook failed: {}" , e)
173175 } ) ?;
174176
175- let cmd = plugin. get_command ( ) ;
177+ let cmd = plugin. get_command ( None ) ;
176178 debug ! ( "获取环境 -> 插件 [ {} ] 命令 {}" , language, cmd) ;
177179
178180 let version_output = Command :: new ( & cmd) . args ( plugin. get_version_args ( ) ) . output ( ) ;
@@ -211,7 +213,7 @@ async fn get_info(
211213 Ok ( LanguageInfo {
212214 installed : false ,
213215 version : "Not found" . to_string ( ) ,
214- path : format ! ( "Not found - tried: {:?}" , plugin. get_command( ) ) ,
216+ path : format ! ( "Not found - tried: {:?}" , plugin. get_command( None ) ) ,
215217 language : plugin. get_language_name ( ) . to_string ( ) ,
216218 } )
217219}
0 commit comments