mirror of https://github.com/actions/toolkit
pull/1344/head
parent
683cee159e
commit
d589c08bf4
|
@ -136,17 +136,18 @@ export async function rmRF(inputPath: string): Promise<void> {
|
|||
} catch (err) {
|
||||
// if you try to delete a file that doesn't exist, desired result is achieved
|
||||
// other errors are valid
|
||||
console.log(err)
|
||||
if (err.code !== 'ENOENT') throw err
|
||||
}
|
||||
|
||||
// Shelling out fails to remove a symlink folder with missing source, this unlink catches that
|
||||
try {
|
||||
await ioUtil.unlink(inputPath)
|
||||
} catch (err) {
|
||||
// if you try to delete a file that doesn't exist, desired result is achieved
|
||||
// other errors are valid
|
||||
if (err.code !== 'ENOENT') throw err
|
||||
}
|
||||
// // Shelling out fails to remove a symlink folder with missing source, this unlink catches that
|
||||
// try {
|
||||
// await ioUtil.unlink(inputPath)
|
||||
// } catch (err) {
|
||||
// // if you try to delete a file that doesn't exist, desired result is achieved
|
||||
// // other errors are valid
|
||||
// if (err.code !== 'ENOENT') throw err
|
||||
// }
|
||||
} else {
|
||||
let isDir = false
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue