Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVallie Joseph <vmjoseph@github.com>2022-12-06 18:54:44 +0000
committerVallie Joseph <vmjoseph@github.com>2022-12-06 18:54:44 +0000
commit9279eb6f975e532409e1296a2dfd932e68bfa26d (patch)
treeb74dc814cb8b9e596095341d8dc6b9f8af84b14b
parent02949ae1bf3aa4d5be207a36ca81d87e4e8d3148 (diff)
.
-rw-r--r--dist/index.js13
-rw-r--r--package-lock.json4
-rw-r--r--package.json2
3 files changed, 8 insertions, 11 deletions
diff --git a/dist/index.js b/dist/index.js
index 00ec095..cbcc485 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -133,6 +133,7 @@ const childProcess = __importStar(__webpack_require__(129));
const path = __importStar(__webpack_require__(622));
const util_1 = __webpack_require__(669);
const ioUtil = __importStar(__webpack_require__(672));
+const exec = util_1.promisify(childProcess.exec);
const execFile = util_1.promisify(childProcess.execFile);
/**
* Copies a file or folder.
@@ -224,17 +225,13 @@ function rmRF(inputPath) {
try {
const cmdPath = ioUtil.getCmdPath();
if (yield ioUtil.isDirectory(inputPath, true)) {
- yield execFile(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, {
+ yield exec(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, {
env: { inputPath }
- }).catch(error => {
- throw new Error(`Failed to remove directory: ${error.message}`);
});
}
else {
- yield execFile(`${cmdPath} /s /c "del /f /a "%inputPath%""`, {
+ yield exec(`${cmdPath} /s /c "del /f /a "%inputPath%""`, {
env: { inputPath }
- }).catch(error => {
- throw new Error(`Failed to remove directory: ${error.message}`);
});
}
}
@@ -246,7 +243,7 @@ function rmRF(inputPath) {
}
// Shelling out fails to remove a symlink folder with missing source, this unlink catches that
try {
- yield ioUtil.unlink(ioUtil.normalizeSeparators(inputPath));
+ yield ioUtil.unlink(inputPath);
}
catch (err) {
// if you try to delete a file that doesn't exist, desired result is achieved
@@ -427,7 +424,7 @@ function copyFile(srcFile, destFile, force) {
// Try to override file permission
if (e.code === 'EPERM') {
yield ioUtil.chmod(destFile, '0666');
- yield ioUtil.rmdir(destFile);
+ yield ioUtil.unlink(destFile);
}
// other errors = it doesn't exist, no work to do
}
diff --git a/package-lock.json b/package-lock.json
index 50ee2cf..a674580 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -59,8 +59,8 @@
}
},
"@actions/io": {
- "version": "file:actions-io-1.1.4.tgz",
- "integrity": "sha512-JM4u7MrkRNjgr8wveZbtihhESfGR6lfV819G1yLWVF1yIhoVkRpVElv28kYFvrh8iU0rWE6VmrOHuZPpspGlcQ=="
+ "version": "file:actions-io-1.1.3.tgz",
+ "integrity": "sha512-GJsPQzUKCnXjTYzTIyA0lfY3vpTCrD2+YyyQEq7WakKF5c7YPR2Ox3PjMnPrSWvseAkEOXz1ZfcidXN7EqLn5w=="
},
"@actions/tool-cache": {
"version": "1.1.2",
diff --git a/package.json b/package.json
index 9c2c075..11316c3 100644
--- a/package.json
+++ b/package.json
@@ -32,7 +32,7 @@
"@actions/core": "^1.10.0",
"@actions/exec": "^1.0.1",
"@actions/github": "^2.2.0",
- "@actions/io": "file:actions-io-1.1.4.tgz",
+ "@actions/io": "file:actions-io-1.1.3.tgz",
"@actions/tool-cache": "^1.1.2",
"uuid": "^3.3.3"
},