From 03dfa71def168de5a52cad231fba56ffd4123397 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 17 Sep 2021 15:13:41 -0500 Subject: [PATCH] fix: add -y to apt --- src/utils/setup/setupAptPack.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/setup/setupAptPack.ts b/src/utils/setup/setupAptPack.ts index af04810e..b4e5bbfe 100644 --- a/src/utils/setup/setupAptPack.ts +++ b/src/utils/setup/setupAptPack.ts @@ -12,22 +12,22 @@ export function setupAptPack(name: string, version?: string, repository: boolean let exit: number | null = 0 if (typeof repository === "string") { - exit = spawn.sync(mightSudo("add-apt-repository"), ["--update", repository], { stdio: "inherit" }).status + exit = spawn.sync(mightSudo("add-apt-repository"), ["--update", "-y", repository], { stdio: "inherit" }).status } if (!didUpdate || repository === true) { - exit = spawn.sync(apt, ["update"], { stdio: "inherit" }).status + exit = spawn.sync(apt, ["update", "-y"], { stdio: "inherit" }).status didUpdate = true } if (version !== undefined && version !== "") { try { - exit = spawn.sync(apt, ["install", `${name}=${version}`], { stdio: "inherit" }).status + exit = spawn.sync(apt, ["install", "-y", `${name}=${version}`], { stdio: "inherit" }).status } catch { - exit = spawn.sync(apt, ["install", `${name}-${version}`], { stdio: "inherit" }).status + exit = spawn.sync(apt, ["install", "-y", `${name}-${version}`], { stdio: "inherit" }).status } } else { - exit = spawn.sync(apt, ["install", name], { stdio: "inherit" }).status + exit = spawn.sync(apt, ["install", "-y", name], { stdio: "inherit" }).status } if (exit !== 0 && exit !== null) {