mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-22 10:29:06 +08:00
trying execFileSync
This commit is contained in:
parent
17bd5c18e9
commit
e0023baa89
@ -4,7 +4,7 @@ import * as path from 'path'
|
||||
import {promisify} from 'util'
|
||||
import * as ioUtil from './io-util'
|
||||
|
||||
// const exec = promisify(childProcess.exec)
|
||||
const execFileSync = promisify(childProcess.execFileSync)
|
||||
// const fork = promisify(childProcess.fork)
|
||||
const execFile = promisify(childProcess.execFile)
|
||||
|
||||
@ -130,12 +130,12 @@ export async function rmRF(inputPath: string): Promise<void> {
|
||||
try {
|
||||
const cmdPath = ioUtil.getCmdPath()
|
||||
if (await ioUtil.isDirectory(inputPath, true)) {
|
||||
await execFile(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, {
|
||||
await execFileSync(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, {
|
||||
env: {inputPath},
|
||||
windowsVerbatimArguments: true
|
||||
})
|
||||
} else {
|
||||
await execFile(`${cmdPath} /s /c "del /f /a "%inputPath%""`, {
|
||||
await execFileSync(`${cmdPath} /s /c "del /f /a "%inputPath%""`, {
|
||||
env: {inputPath},
|
||||
windowsVerbatimArguments: true
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user