mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-22 17:39:06 +08:00
try inlining inputPath
This commit is contained in:
parent
bcf8127e13
commit
7a5a1c3d42
@ -138,18 +138,12 @@ export async function rmRF(inputPath: string): Promise<void> {
|
|||||||
if (await ioUtil.isDirectory(inputPath, true)) {
|
if (await ioUtil.isDirectory(inputPath, true)) {
|
||||||
result = childProcess.spawn(
|
result = childProcess.spawn(
|
||||||
cmdPath,
|
cmdPath,
|
||||||
['/s', '/c', 'rd', '/s', '/q', '"%inputPath%"'],
|
['/s', '/c', 'rd', '/s', '/q', `"${inputPath}"`]
|
||||||
{
|
|
||||||
env: {inputPath}
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
result = childProcess.spawn(
|
result = childProcess.spawn(
|
||||||
cmdPath,
|
cmdPath,
|
||||||
['/s', '/c', 'del', '/f', '/q', '/a', '"%inputPath%"'],
|
['/s', '/c', 'del', '/f', '/q', '/a', `"${inputPath}"`]
|
||||||
{
|
|
||||||
env: {inputPath}
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +156,7 @@ export async function rmRF(inputPath: string): Promise<void> {
|
|||||||
})
|
})
|
||||||
|
|
||||||
result.stderr?.on('data', data => {
|
result.stderr?.on('data', data => {
|
||||||
console.log(`stdout: ${data}`)
|
console.log(`stderr: ${data}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
result.on('error', err => {
|
result.on('error', err => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user