Skip to content

Commit d2f3163

Browse files
committed
fix: calculate tools using Object.keys + fix linting for python-pygments
1 parent 73a098f commit d2f3163

File tree

5 files changed

+8
-40
lines changed

5 files changed

+8
-40
lines changed

dist/node12/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/node12/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/node16/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/node16/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.

src/main.ts

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -80,35 +80,7 @@ const setups = {
8080
}
8181

8282
/** The tools that can be installed */
83-
const tools: Array<keyof typeof setups> = [
84-
"nala",
85-
"choco",
86-
"brew",
87-
"python",
88-
"powershell",
89-
"vcpkg",
90-
"bazel",
91-
"cmake",
92-
"ninja",
93-
"conan",
94-
"meson",
95-
"gcovr",
96-
"opencppcoverage",
97-
"ccache",
98-
"doxygen",
99-
"graphviz",
100-
"cppcheck",
101-
"clangtidy",
102-
"clangformat",
103-
"llvm",
104-
"gcc",
105-
"msvc",
106-
"vcvarsall",
107-
"kcov",
108-
"make",
109-
"task",
110-
"sevenzip",
111-
]
83+
const tools = Object.keys(setups) as Array<keyof typeof setups>
11284

11385
/** The possible inputs to the program */
11486
export type Inputs = keyof typeof setups | "compiler" | "architecture"
@@ -158,13 +130,9 @@ export async function main(args: string[]): Promise<number> {
158130

159131
let hasLLVM = false // used to unset CPPFLAGS of LLVM when other compilers are used as the main compiler
160132

161-
// install python-pygments to avoid conflicts with cppcheck and gcovr on arch linux
162-
if (process.platform === "linux") {
163-
if (isArch()) {
164-
if (opts.cppcheck && opts.gcovr) {
165-
setupPacmanPack("python-pygments")
166-
}
167-
}
133+
if (isArch() && typeof opts.cppcheck === "string" && typeof opts.gcovr === "string") {
134+
info("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux")
135+
setupPacmanPack("python-pygments")
168136
}
169137

170138
// loop over the tools and run their setup function

0 commit comments

Comments
 (0)