Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f43944d5d |
@@ -9,7 +9,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
## GitHub Actions Toolkit
|
## GitHub Actions Toolkit Test
|
||||||
|
|
||||||
The GitHub Actions ToolKit provides a set of packages to make creating actions easier.
|
The GitHub Actions ToolKit provides a set of packages to make creating actions easier.
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ console.log(`We can even get context data, like the repo: ${context.repo.repo}`)
|
|||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
We welcome contributions. See [how to contribute](.github/CONTRIBUTING.md).
|
We welcome contributions. See [how to contribute](.github/CONTRIBUTING.md).
|
||||||
hi
|
|
||||||
## Code of Conduct
|
## Code of Conduct
|
||||||
|
|
||||||
See [our code of conduct](CODE_OF_CONDUCT.md).
|
See [our code of conduct](CODE_OF_CONDUCT.md).
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/io",
|
"name": "@actions/io",
|
||||||
"version": "1.1.3",
|
"version": "1.1.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@actions/io",
|
"name": "@actions/io",
|
||||||
"version": "1.1.3",
|
"version": "1.1.2",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/io",
|
"name": "@actions/io",
|
||||||
"version": "1.1.3",
|
"version": "1.1.2",
|
||||||
"description": "Actions io lib",
|
"description": "Actions io lib",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"github",
|
"github",
|
||||||
|
|||||||
+3
-12
@@ -4,8 +4,7 @@ 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 exec = promisify(childProcess.exec)
|
||||||
// const fork = promisify(childProcess.fork)
|
|
||||||
const execFile = promisify(childProcess.execFile)
|
const execFile = promisify(childProcess.execFile)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -130,20 +129,12 @@ export async function rmRF(inputPath: string): Promise<void> {
|
|||||||
try {
|
try {
|
||||||
const cmdPath = ioUtil.getCmdPath()
|
const cmdPath = ioUtil.getCmdPath()
|
||||||
if (await ioUtil.isDirectory(inputPath, true)) {
|
if (await ioUtil.isDirectory(inputPath, true)) {
|
||||||
await execFile(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, {
|
await exec(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, {
|
||||||
env: {inputPath}
|
env: {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 {
|
} else {
|
||||||
await execFile(`${cmdPath} /s /c "del /f /a "%inputPath%""`, {
|
await exec(`${cmdPath} /s /c "del /f /a "%inputPath%""`, {
|
||||||
env: {inputPath}
|
env: {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
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user