Skip to content

Commit

Permalink
fix file
Browse files Browse the repository at this point in the history
  • Loading branch information
Vsevolod committed Dec 4, 2024
1 parent 2d5382e commit 348ce7a
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions module/core/process_tools/src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,22 +234,22 @@ mod private
// # Returns:
// A `Result` containing a `Report` on success, which includes the command's output,
// or an error if the command fails to execute or complete.
// pub fn run_with_shell( self, exec_path : &str, ) -> Result< Report, Report >
// {
// let ( program, args ) =
// if cfg!( target_os = "windows" )
// {
// ( "gspread", [ "/C", exec_path ] )
// }
// else
// {
// ( "sh", [ "-c", exec_path ] )
// };
// self
// .args( args.into_iter().map( OsString::from ).collect::< Vec< _ > >() )
// .bin_path( program )
// .run()
// }
pub fn run_with_shell( self, exec_path : &str, ) -> Result< Report, Report >
{
let ( program, args ) =
if cfg!( target_os = "windows" )
{
( "cmd", [ "/C", exec_path ] )
}
else
{
( "sh", [ "-c", exec_path ] )
};
self
.args( args.into_iter().map( OsString::from ).collect::< Vec< _ > >() )
.bin_path( program )
.run()
}
}

/// Process command output.
Expand Down

0 comments on commit 348ce7a

Please sign in to comment.