mirror of https://github.com/actions/toolkit
pull/1344/head
parent
9529f35ffd
commit
4272cd6ca1
|
@ -9,8 +9,8 @@ export const {
|
||||||
readdir,
|
readdir,
|
||||||
readlink,
|
readlink,
|
||||||
rename,
|
rename,
|
||||||
rm,
|
|
||||||
rmdir,
|
rmdir,
|
||||||
|
rm,
|
||||||
stat,
|
stat,
|
||||||
symlink,
|
symlink,
|
||||||
unlink
|
unlink
|
||||||
|
|
|
@ -127,13 +127,13 @@ export async function rmRF(inputPath: string): Promise<void> {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const cmdPath = ioUtil.getCmdPath()
|
|
||||||
|
|
||||||
await ioUtil.rm(inputPath, {
|
await ioUtil.rm(inputPath, {
|
||||||
recursive: true,
|
recursive: true,
|
||||||
force: true
|
force: true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// const cmdPath = ioUtil.getCmdPath()
|
||||||
|
|
||||||
// const p = new Promise(async resolve => {
|
// const p = new Promise(async resolve => {
|
||||||
// setTimeout(() => {
|
// setTimeout(() => {
|
||||||
// resolve('timeout')
|
// resolve('timeout')
|
||||||
|
@ -197,12 +197,6 @@ export async function rmRF(inputPath: string): Promise<void> {
|
||||||
// Shelling out fails to remove a symlink folder with missing source, this unlink catches that
|
// Shelling out fails to remove a symlink folder with missing source, this unlink catches that
|
||||||
try {
|
try {
|
||||||
if (await ioUtil.exists(inputPath)) {
|
if (await ioUtil.exists(inputPath)) {
|
||||||
if (await ioUtil.isDirectory(inputPath)) {
|
|
||||||
const files = await ioUtil.readdir(inputPath)
|
|
||||||
for (const file of files) {
|
|
||||||
console.log(`second ioUtil.readdir: ${file}`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
await ioUtil.unlink(inputPath)
|
await ioUtil.unlink(inputPath)
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
Loading…
Reference in New Issue