Skip to content

Commit e799c95

Browse files
committed
chore: remove unused updateAptAlternatives for pacman
1 parent 7caf0dd commit e799c95

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

src/utils/setup/setupPacmanPack.ts

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
/* eslint-disable require-atomic-updates */
22
import { InstallationInfo } from "./setupBin"
33
import { execSudo } from "../exec/sudo"
4-
import { info } from "@actions/core"
5-
import { isGitHubCI } from "../env/isci"
6-
import { cpprc_path, setupCppInProfile } from "../env/addEnv"
7-
import { appendFileSync } from "fs"
4+
import { info } from "../io/io"
85

96
let didUpdate: boolean = false
107
let didInit: boolean = false
@@ -21,10 +18,11 @@ export function setupPacmanPack(name: string, version?: string, aur?: string): I
2118
}
2219

2320
if (!didInit) {
24-
// install base-devel
2521
// set time - zone
2622
// TZ = Canada / Pacific
2723
// ln - snf / usr / share / zoneinfo / $TZ / etc / localtime && echo $TZ > /etc/timezone
24+
25+
// install base-devel
2826
execSudo(pacman, ["-Sy", "--noconfirm", "base-devel"])
2927
didInit = true
3028
}
@@ -41,15 +39,3 @@ export function setupPacmanPack(name: string, version?: string, aur?: string): I
4139

4240
return { binDir: "/usr/bin/" }
4341
}
44-
45-
export function updateAptAlternatives(name: string, path: string) {
46-
if (isGitHubCI()) {
47-
return execSudo("update-alternatives", ["--install", `/usr/bin/${name}`, name, path, "40"])
48-
} else {
49-
setupCppInProfile()
50-
return appendFileSync(
51-
cpprc_path,
52-
`\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${name} ${name} ${path} 40; fi\n`
53-
)
54-
}
55-
}

0 commit comments

Comments
 (0)