Revert 9ed8db22c ('windows' pager process execution fix) based on PR feedback/owner request

This commit is contained in:
Roy Ivy III 2020-06-01 10:30:29 -05:00 committed by David Peter
parent 4840c7cd78
commit 99226b745f
1 changed files with 2 additions and 11 deletions

View File

@ -74,18 +74,8 @@ impl OutputType {
let is_less = pager_path.file_stem() == Some(&OsString::from("less"));
#[cfg(windows)]
let (pager_path, args) = {
let p = std::env::var("ComSpec").unwrap_or_else(|_| "cmd".to_string());
let mut a = args.to_vec();
a.insert(0, pager_path.to_str().unwrap().to_string());
a.insert(0, "/d/c".to_string());
(p, a)
};
let mut p = Command::new(&pager_path);
let mut process = if is_less {
let mut p = Command::new(&pager_path);
if args.is_empty() || replace_arguments_to_less {
p.arg("--RAW-CONTROL-CHARS");
if quit_if_one_screen {
@ -116,6 +106,7 @@ impl OutputType {
p.env("LESSCHARSET", "UTF-8");
p
} else {
let mut p = Command::new(&pager_path);
p.args(args);
p
};