Skip to content

Commit

Permalink
Set LANG=en_US.UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
greymd committed Jan 24, 2024
1 parent 4f8c87a commit 5ace2ac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
name: test
runs-on: ${{matrix.os}}
env:
# Apply UTF-8 since GitHub actions has en_US.UTF-8 as of Jan 2024
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
if: "! contains(github.event.head_commit.message, '[skip ci]')"
Expand Down Expand Up @@ -49,8 +50,6 @@ jobs:
- name: Run tests
timeout-minutes: 10
run: |
echo 'あ' | sed 's/./@/g'
env
cargo test --verbose --features oniguruma
bash tests/test_large_file.sh
bash tests/test_long_line.sh
3 changes: 0 additions & 3 deletions src/spawnutils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ pub fn exec_cmd(
return Ok((Box::new(io::sink()), Box::new(io::empty()), "".to_string()));
}
let child = Command::new(&cmds[0])
.env("LANG", "en_US.UTF-8")
.args(&cmds[1..])
.stdin(Stdio::piped())
.stdout(Stdio::piped())
Expand Down Expand Up @@ -55,7 +54,6 @@ pub fn exec_cmd_sync_replace(input: String, cmds: &Vec<String>, line_end: u8, ch
}
}
let child = Command::new(&cmds_new[0])
.env("LANG", "en_US.UTF-8")
.args(&cmds_new[1..])
.stdout(Stdio::piped())
.spawn()
Expand All @@ -81,7 +79,6 @@ pub fn exec_cmd_sync_replace(input: String, cmds: &Vec<String>, line_end: u8, ch
pub fn exec_cmd_sync(input: String, cmds: &Vec<String>, line_end: u8, chomp: bool) -> String {
debug!("thread: exec_cmd_sync: {:?}", &cmds);
let mut child = Command::new(&cmds[0])
.env("LANG", "en_US.UTF-8")
.args(&cmds[1..])
.stdin(Stdio::piped())
.stdout(Stdio::piped())
Expand Down

0 comments on commit 5ace2ac

Please sign in to comment.