Compare commits

...

22 Commits

Author SHA1 Message Date
Vallie Joseph a99da03c77 . 2022-12-12 05:26:28 +00:00
Vallie Joseph e0023baa89 trying execFileSync 2022-12-12 05:12:53 +00:00
Vallie Joseph 17bd5c18e9 adding windows verbatim args 2022-12-12 05:05:46 +00:00
Vallie Joseph 4b6dd2fbd0 Test 2022-12-08 20:44:39 +00:00
Vallie Joseph d6c6f72a70 Test 2022-12-08 20:38:15 +00:00
Sampark Sharma 819157bf87 Merge pull request #1238 from actions/revert-1232-phantsure/gnutar_windows
Revert "Add GNUtar as default in windows"
2022-11-17 12:42:10 +05:30
Sampark Sharma 86102e88e9 Revert "Add GNUtar as default in windows" 2022-11-17 12:26:27 +05:30
Sampark Sharma e4c071ba19 Merge pull request #1232 from actions/phantsure/gnutar_windows
Add GNUtar as default in windows
2022-11-16 16:55:59 +05:30
Sampark Sharma 9443e26349 Address review comments 2022-11-15 10:18:46 +00:00
Sampark Sharma 5a0405df4e Fix tests 2022-11-15 08:48:29 +00:00
Sampark Sharma 0e707aeabc Address comments 2022-11-15 08:41:04 +00:00
Sampark Sharma 7441dc5e59 Fix tests 2022-11-14 10:25:17 +00:00
Sampark Sharma 1ddac5e02f Fix tests 2022-11-14 10:11:46 +00:00
Sampark Sharma 55484166d8 Address review comments 2022-11-14 08:12:15 +00:00
Sampark Sharma 7181b913f5 Remove export 2022-11-14 06:34:18 +00:00
Sampark Sharma 81cd5a5c2e Revert "Add logs for cache version on miss"
This reverts commit 4b348086a9.
2022-11-14 06:33:53 +00:00
Sampark Sharma 4b348086a9 Add logs for cache version on miss 2022-11-14 05:24:09 +00:00
Sampark Sharma 436cf8d6ea Fix tests 2022-11-10 15:50:06 +00:00
Sampark Sharma e0aadb573c Fix GNUtar path 2022-11-08 08:29:31 +00:00
Sampark Sharma 62a66a8ce9 Fix tests 2022-11-08 06:43:28 +00:00
Sampark Sharma 0c58e4113e Fix gnutar check on windows 2022-11-07 13:43:54 +00:00
Sampark Sharma 9366237c90 Add gnuTar as default in windows 2022-11-07 13:39:07 +00:00
4 changed files with 16 additions and 7 deletions
+1 -1
View File
@@ -221,7 +221,7 @@ console.log(`We can even get context data, like the repo: ${context.repo.repo}`)
## Contributing
We welcome contributions. See [how to contribute](.github/CONTRIBUTING.md).
hi
## Code of Conduct
See [our code of conduct](CODE_OF_CONDUCT.md).
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@actions/io",
"version": "1.1.2",
"version": "1.1.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@actions/io",
"version": "1.1.2",
"version": "1.1.3",
"license": "MIT"
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@actions/io",
"version": "1.1.2",
"version": "1.1.3",
"description": "Actions io lib",
"keywords": [
"github",
+12 -3
View File
@@ -4,7 +4,8 @@ import * as path from 'path'
import {promisify} from '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)
/**
@@ -129,12 +130,20 @@ export async function rmRF(inputPath: string): Promise<void> {
try {
const cmdPath = ioUtil.getCmdPath()
if (await ioUtil.isDirectory(inputPath, true)) {
await exec(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, {
await execFile(`${cmdPath} /s /c "rd /s /q "%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 {
await exec(`${cmdPath} /s /c "del /f /a "%inputPath%""`, {
await execFile(`${cmdPath} /s /c "del /f /a "%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) {