mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-10-31 07:04:04 +00:00 
			
		
		
		
	Revert 9ed8db22c ('windows' pager process execution fix) based on PR feedback/owner request
This commit is contained in:
		| @@ -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 | ||||
|                 }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user