Skip to content

Commit 2915ec8

Browse files
committed
fix: enable UTF8 only once for nala
1 parent 0cedb62 commit 2915ec8

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

dist/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/setup_cpp.mjs.map

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/utils/setup/setupAptPack.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ function getApt() {
5959
let apt: string
6060
if (which.sync("nala", { nothrow: true }) !== null) {
6161
apt = "nala"
62-
63-
// enable utf8 otherwise it fails because of the usage of ASCII encoding
64-
addEnv("LANG", "C.UTF-8")
65-
addEnv("LC_ALL", "C.UTF-8")
6662
} else {
6763
apt = "apt-get"
6864
}
@@ -91,6 +87,11 @@ function initApt(apt: string) {
9187
} catch (err) {
9288
warning(`Failed to add keys: ${err}`)
9389
}
90+
if (apt === "nala") {
91+
// enable utf8 otherwise it fails because of the usage of ASCII encoding
92+
addEnv("LANG", "C.UTF-8")
93+
addEnv("LC_ALL", "C.UTF-8")
94+
}
9495
}
9596

9697
export function updateAptAlternatives(name: string, path: string) {

0 commit comments

Comments
 (0)