File tree Expand file tree Collapse file tree 1 file changed +16
-16
lines changed
module/core/process_tools/src Expand file tree Collapse file tree 1 file changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -234,22 +234,22 @@ mod private
234234 // # Returns:
235235 // A `Result` containing a `Report` on success, which includes the command's output,
236236 // or an error if the command fails to execute or complete.
237- // pub fn run_with_shell( self, exec_path : &str, ) -> Result< Report, Report >
238- // {
239- // let ( program, args ) =
240- // if cfg!( target_os = "windows" )
241- // {
242- // ( "gspread ", [ "/C", exec_path ] )
243- // }
244- // else
245- // {
246- // ( "sh", [ "-c", exec_path ] )
247- // };
248- // self
249- // .args( args.into_iter().map( OsString::from ).collect::< Vec< _ > >() )
250- // .bin_path( program )
251- // .run()
252- // }
237+ pub fn run_with_shell ( self , exec_path : & str , ) -> Result < Report , Report >
238+ {
239+ let ( program, args ) =
240+ if cfg ! ( target_os = "windows" )
241+ {
242+ ( "cmd " , [ "/C" , exec_path ] )
243+ }
244+ else
245+ {
246+ ( "sh" , [ "-c" , exec_path ] )
247+ } ;
248+ self
249+ . args ( args. into_iter ( ) . map ( OsString :: from ) . collect :: < Vec < _ > > ( ) )
250+ . bin_path ( program )
251+ . run ( )
252+ }
253253 }
254254
255255 /// Process command output.
You can’t perform that action at this time.
0 commit comments