Skip to content

Commit 8a5b753

Browse files
committed
fix: install ca-certificates before downloading
1 parent ee26599 commit 8a5b753

File tree

9 files changed

+17
-12
lines changed

9 files changed

+17
-12
lines changed

dist/actions/setup-cpp.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/actions/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/legacy/setup-cpp.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/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/modern/setup-cpp.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/modern/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.

packages/setup-apt/src/apt-key.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { execRoot, execRootSync } from "admina"
33
import { warning } from "ci-log"
44
import { DownloaderHelper } from "node-downloader-helper"
55
import { pathExists } from "path-exists"
6+
import { installAptPack } from "./install.js"
67

78
function initGpg() {
89
execRootSync("gpg", ["-k"])
@@ -54,6 +55,7 @@ export async function addAptKeyViaDownload(name: string, url: string) {
5455
if (!(await pathExists(fileName))) {
5556
initGpg()
5657

58+
await installAptPack([{ name: "ca-certificates" }])
5759
const dl = new DownloaderHelper(url, tmpdir(), { fileName: name })
5860
dl.on("error", (err) => {
5961
throw new Error(`Failed to download ${url}: ${err}`)

src/brew/brew.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { addPath } from "envosman"
33
import { execaSync } from "execa"
44
import { DownloaderHelper } from "node-downloader-helper"
55
import { dirname } from "patha"
6+
import { installAptPack } from "setup-apt"
67
import which from "which"
78
import { rcOptions } from "../cli-options.js"
89

@@ -29,6 +30,7 @@ export async function setupBrew(_version: string, _setupDir: string, _arch: stri
2930
}
3031

3132
// download the installation script
33+
await installAptPack([{ name: "ca-certificates" }])
3234
const dl = new DownloaderHelper("https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh", tmpdir(), {
3335
fileName: "install-brew.sh",
3436
})

src/llvm/llvm_installer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export async function setupLLVMApt(
2424
const installationFolder = `/usr/lib/llvm-${majorVersion}`
2525

2626
// download the installation script
27+
await installAptPack([{ name: "ca-certificates" }])
2728
const dl = new DownloaderHelper("https://apt.llvm.org/llvm.sh", tmpdir(), { fileName: "llvm.sh" })
2829
dl.on("error", (err) => {
2930
throw new Error(`Failed to download the LLVM installer script: ${err}`)

0 commit comments

Comments
 (0)