From 10a23a7e09002ff67d88aabc623e14274094afa6 Mon Sep 17 00:00:00 2001 From: iff Date: Sun, 6 Aug 2023 11:10:50 +0200 Subject: [PATCH] fix: set language env only when getting output --- src/main.rs | 1 - src/shell.rs | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 971bbc9..ef0e97c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,7 +7,6 @@ mod style; mod suggestions; fn main() { - std::env::set_var("LC_ALL", "C"); args::handle_args(); let shell = std::env::var("_PR_SHELL").expect( diff --git a/src/shell.rs b/src/shell.rs index d195047..3cac7ae 100644 --- a/src/shell.rs +++ b/src/shell.rs @@ -7,6 +7,7 @@ pub fn command_output(shell: &str, command: &str) -> String { let output = std::process::Command::new(shell) .arg("-c") .arg(command) + .env("LC_ALL", "C") .output() .expect("failed to execute process");