Skip to content

Commit a3723b0

Browse files
committed
fix: use fs-extra for move
1 parent c2c30d9 commit a3723b0

12 files changed

+52
-14
lines changed

cspell.config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ words:
2121
- bazel
2222
- bazelisk
2323
- biome
24+
- mkdirp
2425
- biomejs
2526
- buildtools
2627
- caxa

dist/legacy/assets/actions_python-Czj4ScEf.js renamed to dist/legacy/assets/actions_python-Dd4yvI9c.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/assets/actions_python-Czj4ScEf.js.map renamed to dist/legacy/assets/actions_python-Dd4yvI9c.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/setup-cpp.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/setup-cpp.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/modern/assets/actions_python-C5ar-1oi.mjs renamed to dist/modern/assets/actions_python-NQlJj7Cn.mjs

+2-2
Large diffs are not rendered by default.

dist/modern/assets/actions_python-C5ar-1oi.mjs.map renamed to dist/modern/assets/actions_python-NQlJj7Cn.mjs.map

+1-1
Large diffs are not rendered by default.

dist/modern/setup-cpp.mjs

+1-1
Large diffs are not rendered by default.

dist/modern/setup-cpp.mjs.map

+1-1
Large diffs are not rendered by default.

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
"@types/cross-spawn": "^6.0.6",
8484
"@types/escape-quotes": "~1.0.0",
8585
"@types/eslint": "^9.6.1",
86+
"@types/fs-extra": "^11.0.4",
8687
"@types/iarna__toml": "~2.0.5",
8788
"@types/jest": "^29.5.14",
8889
"@types/memoizee": "^0.4.11",
@@ -107,6 +108,7 @@
107108
"eslint-config-atomic": "^1.22.1",
108109
"exec-powershell": "workspace:*",
109110
"execa": "^7",
111+
"fs-extra": "^11.3.0",
110112
"is-url-online": "^1.5.0",
111113
"jest": "^29.7.0",
112114
"lefthook": "^1.10.3",
@@ -186,7 +188,8 @@
186188
"untildify-user",
187189
"util.types",
188190
"web-streams-polyfill",
189-
"timers-browserify"
191+
"timers-browserify",
192+
"fs-extra"
190193
],
191194
"engines": {
192195
"node": ">=12.x",

pnpm-lock.yaml

+34
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/setup/extract.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { basename, dirname, join } from "path"
2-
import { mkdirP, mv } from "@actions/io"
32
import { grantUserWriteAccess } from "admina"
43
import { info, warning } from "ci-log"
54
import { execa } from "execa"
5+
import { mkdirp, move } from "fs-extra"
66
import { rm } from "fs/promises"
77
import { installAptPack } from "setup-apt"
88
import which from "which"
@@ -83,7 +83,7 @@ export async function extract7Zip(file: string, dest: string) {
8383
const folderName = tarName.slice(0, -4)
8484
const folderPath = join(tarDir, folderName)
8585
info(`Moving ${folderPath} to ${dest}`)
86-
await mv(folderPath, dest, { force: true })
86+
await move(folderPath, dest, { overwrite: true })
8787
} else {
8888
// extract the 7z file directly
8989
await run7zip(file, dest)
@@ -137,7 +137,7 @@ export async function extractTarByExe(file: string, dest: string, stripComponent
137137
await installTarDependencies(getArchiveType(file))
138138

139139
try {
140-
await mkdirP(dest)
140+
await mkdirp(dest)
141141
} catch {
142142
// ignore
143143
}

0 commit comments

Comments
 (0)