mirror of https://github.com/aminya/setup-cpp
fix: enable UTF8 only once for nala
This commit is contained in:
parent
0cedb62c7b
commit
2915ec8f01
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -59,10 +59,6 @@ function getApt() {
|
|||
let apt: string
|
||||
if (which.sync("nala", { nothrow: true }) !== null) {
|
||||
apt = "nala"
|
||||
|
||||
// enable utf8 otherwise it fails because of the usage of ASCII encoding
|
||||
addEnv("LANG", "C.UTF-8")
|
||||
addEnv("LC_ALL", "C.UTF-8")
|
||||
} else {
|
||||
apt = "apt-get"
|
||||
}
|
||||
|
@ -91,6 +87,11 @@ function initApt(apt: string) {
|
|||
} catch (err) {
|
||||
warning(`Failed to add keys: ${err}`)
|
||||
}
|
||||
if (apt === "nala") {
|
||||
// enable utf8 otherwise it fails because of the usage of ASCII encoding
|
||||
addEnv("LANG", "C.UTF-8")
|
||||
addEnv("LC_ALL", "C.UTF-8")
|
||||
}
|
||||
}
|
||||
|
||||
export function updateAptAlternatives(name: string, path: string) {
|
||||
|
|
Loading…
Reference in New Issue