MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / run_shell_command

Function run_shell_command

rust/src/shell.rs:53–58  ·  view source on GitHub ↗
(command: Command)

Source from the content-addressed store, hash-verified

51}
52
53pub fn run_shell_command(command: Command) -> Result<String, Error> {
54 let mut process = ProcessCommand::new(command.program);
55 process.args(command.args);
56 let output = process.output()?;
57 Ok(strip_trailing_newline(&String::from_utf8_lossy(&output.stdout)).to_string())
58}
59
60pub fn strip_trailing_newline(input: &str) -> &str {
61 input

Callers 7

defaultMethod · 0.85
uncompress_dmgFunction · 0.85
install_msiFunction · 0.85
find_driver_in_pathMethod · 0.85
is_windows_adminMethod · 0.85
exec_driverFunction · 0.85

Calls 2

strip_trailing_newlineFunction · 0.85
argsMethod · 0.80

Tested by 1

exec_driverFunction · 0.68