Skip to content

Commit 03dfa71

Browse files
committed
fix: add -y to apt
1 parent 1a81d4e commit 03dfa71

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/utils/setup/setupAptPack.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ export function setupAptPack(name: string, version?: string, repository: boolean
1212
let exit: number | null = 0
1313

1414
if (typeof repository === "string") {
15-
exit = spawn.sync(mightSudo("add-apt-repository"), ["--update", repository], { stdio: "inherit" }).status
15+
exit = spawn.sync(mightSudo("add-apt-repository"), ["--update", "-y", repository], { stdio: "inherit" }).status
1616
}
1717

1818
if (!didUpdate || repository === true) {
19-
exit = spawn.sync(apt, ["update"], { stdio: "inherit" }).status
19+
exit = spawn.sync(apt, ["update", "-y"], { stdio: "inherit" }).status
2020
didUpdate = true
2121
}
2222

2323
if (version !== undefined && version !== "") {
2424
try {
25-
exit = spawn.sync(apt, ["install", `${name}=${version}`], { stdio: "inherit" }).status
25+
exit = spawn.sync(apt, ["install", "-y", `${name}=${version}`], { stdio: "inherit" }).status
2626
} catch {
27-
exit = spawn.sync(apt, ["install", `${name}-${version}`], { stdio: "inherit" }).status
27+
exit = spawn.sync(apt, ["install", "-y", `${name}-${version}`], { stdio: "inherit" }).status
2828
}
2929
} else {
30-
exit = spawn.sync(apt, ["install", name], { stdio: "inherit" }).status
30+
exit = spawn.sync(apt, ["install", "-y", name], { stdio: "inherit" }).status
3131
}
3232

3333
if (exit !== 0 && exit !== null) {

0 commit comments

Comments
 (0)