Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bbd518e697 | |||
| a021f2c1ff | |||
| 13b560e403 | |||
| 15d2a3e22a |
@@ -28,7 +28,7 @@ jobs:
|
|||||||
- name: Set Node.js 12.x
|
- name: Set Node.js 12.x
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 12.x
|
node-version: 16.x
|
||||||
|
|
||||||
- name: npm install
|
- name: npm install
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|||||||
@@ -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
+1349
-17234
File diff suppressed because it is too large
Load Diff
+1
-10
@@ -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)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -132,18 +131,10 @@ export async function rmRF(inputPath: string): Promise<void> {
|
|||||||
if (await ioUtil.isDirectory(inputPath, true)) {
|
if (await ioUtil.isDirectory(inputPath, true)) {
|
||||||
await execFile(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, {
|
await execFile(`${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 execFile(`${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