mirror of https://github.com/aminya/setup-cpp
fix: try-catch adding apt keys
This commit is contained in:
parent
f3262ffc25
commit
548467eb8f
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -2,6 +2,7 @@
|
|||
import { InstallationInfo } from "./setupBin"
|
||||
import { execSudo } from "../exec/sudo"
|
||||
import { info } from "@actions/core"
|
||||
import { warning } from "../io/io"
|
||||
|
||||
let didUpdate: boolean = false
|
||||
let didInit: boolean = false
|
||||
|
@ -37,9 +38,13 @@ export async function setupAptPack(
|
|||
"ca-certificates",
|
||||
"gnupg",
|
||||
])
|
||||
await execSudo("apt-key", ["adv", "--keyserver", "keyserver.ubuntu.com", "--recv-keys", "3B4FE6ACC0B21F32"])
|
||||
await execSudo("apt-key", ["adv", "--keyserver", "keyserver.ubuntu.com", "--recv-keys", "40976EAF437D05B5"])
|
||||
await execSudo("apt-key", ["adv", "--keyserver", "keyserver.ubuntu.com", "--recv-keys", "1E9377A2BA9EF27F"])
|
||||
try {
|
||||
await execSudo("apt-key", ["adv", "--keyserver", "keyserver.ubuntu.com", "--recv-keys", "3B4FE6ACC0B21F32"])
|
||||
await execSudo("apt-key", ["adv", "--keyserver", "keyserver.ubuntu.com", "--recv-keys", "40976EAF437D05B5"])
|
||||
await execSudo("apt-key", ["adv", "--keyserver", "keyserver.ubuntu.com", "--recv-keys", "1E9377A2BA9EF27F"])
|
||||
} catch (err) {
|
||||
warning(`Failed to add keys: ${err}`)
|
||||
}
|
||||
didInit = true
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue