1
0
Fork 0
pull/1344/head
Cory Miller 2023-02-21 17:00:46 +00:00
parent 9529f35ffd
commit 4272cd6ca1
2 changed files with 3 additions and 9 deletions

View File

@ -9,8 +9,8 @@ export const {
readdir, readdir,
readlink, readlink,
rename, rename,
rm,
rmdir, rmdir,
rm,
stat, stat,
symlink, symlink,
unlink unlink

View File

@ -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) {