mirror of https://github.com/actions/toolkit
await on exists
parent
8d2f32e652
commit
6a357de342
|
@ -4,7 +4,6 @@ import * as path from 'path'
|
||||||
import {promisify} from 'util'
|
import {promisify} from 'util'
|
||||||
import * as ioUtil from './io-util'
|
import * as ioUtil from './io-util'
|
||||||
|
|
||||||
const exec = promisify(childProcess.exec)
|
|
||||||
const execFile = promisify(childProcess.execFile)
|
const execFile = promisify(childProcess.execFile)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -167,7 +166,7 @@ export async function rmRF(inputPath: string): Promise<void> {
|
||||||
console.log('b')
|
console.log('b')
|
||||||
// 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 (ioUtil.exists(inputPath)) {
|
if (await ioUtil.exists(inputPath)) {
|
||||||
await ioUtil.unlink(inputPath)
|
await ioUtil.unlink(inputPath)
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
Loading…
Reference in New Issue