mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-10-31 15:12:12 +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")); |                 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 process = if is_less { | ||||||
|  |                     let mut p = Command::new(&pager_path); | ||||||
|                     if args.is_empty() || replace_arguments_to_less { |                     if args.is_empty() || replace_arguments_to_less { | ||||||
|                         p.arg("--RAW-CONTROL-CHARS"); |                         p.arg("--RAW-CONTROL-CHARS"); | ||||||
|                         if quit_if_one_screen { |                         if quit_if_one_screen { | ||||||
| @@ -116,6 +106,7 @@ impl OutputType { | |||||||
|                     p.env("LESSCHARSET", "UTF-8"); |                     p.env("LESSCHARSET", "UTF-8"); | ||||||
|                     p |                     p | ||||||
|                 } else { |                 } else { | ||||||
|  |                     let mut p = Command::new(&pager_path); | ||||||
|                     p.args(args); |                     p.args(args); | ||||||
|                     p |                     p | ||||||
|                 }; |                 }; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user