Skip to content

Commit 4446128

Browse files
author
Vsevolod
committed
file fix
1 parent 13b9b1f commit 4446128

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

module/core/process_tools/src/process.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)