Skip to content
Myr

bug: quoting failure on windows-platform (#296)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Pedro Witzel · committed by David Peter · parent 25331f8 · Browse files · 1 file+11 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+11 added−3 removed

  • other:+11 added−3 removed

1 file+11 added−3 removed

modified:src/benchmark/executor.rs+11 added-3 removed
1use std::os::windows::process::CommandExt;2use std::process::ExitStatus;34use crate::command::Command;5use crate::options::{
127 unmodified lines
133 &self,134 command: &Command<'_>,135 command_failure_action: Option<CmdFailureAction>,136 ) -> Result<(TimingResult, ExitStatus)> {137 let on_windows_cmd = cfg!(windows) && *self.shell == Shell::Default("cmd.exe");138 let mut command_builder = self.shell.command();139 command_builder140 .arg(139 if cfg!(windows) && *self.shell == Shell::Default("cmd.exe") {141 if on_windows_cmd {142 "/C"143 } else {144 "-c"145 },144 )145 .arg(command.get_command_line());146 );147148 // Windows needs special treatment for its behavior on parsing cmd arguments149 if on_windows_cmd {150 command_builder.raw_arg(command.get_command_line());151 } else {152 command_builder.arg(command.get_command_line());153 }154155 let mut result = run_command_and_measure_common(156 command_builder,157 command_failure_action.unwrap_or(self.options.command_failure_action),158 &self.options.command_input_policy,
149 unmodified lines