Skip to content

Commit 988b5fd

Browse files
committed
fix: update the apt-fast config as root
1 parent c9348d3 commit 988b5fd

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed

dist/legacy/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/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.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/modern/setup-cpp.mjs.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/__tests__/apt-fast.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { execRootSync } from "admina"
21
import { hasAptGet, setupAptFast } from "../src/index.js"
32
import { testBin } from "./testBin.js"
43

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ async function setupAptFastViaInstaller() {
6969
aptFastConfig = aptFastConfig.replace(new RegExp(`^#\\s*${opt}`, "m"), opt)
7070
}
7171

72-
// write the config
73-
await writeFile(aptFastConfigPath, aptFastConfig)
72+
// write the config using execRootSync
73+
const tempAptFast = join(tmpdir(), "apt-fast.conf")
74+
await writeFile(tempAptFast, aptFastConfig)
75+
execRootSync("mv", [tempAptFast, aptFastConfigPath])
7476
}

0 commit comments

Comments
 (0)