Compare commits
10 Commits
e3d7676897
...
vmjoseph/t
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c22ccee38a | ||
|
|
34070387ee | ||
|
|
58c9d1fc61 | ||
|
|
13f797543f | ||
|
|
763ea18a94 | ||
|
|
a20b6de448 | ||
|
|
07918fc7c9 | ||
|
|
24234e3dfa | ||
|
|
637bbe688e | ||
|
|
b63c69da2f |
Binary file not shown.
22
dist/index.js
vendored
22
dist/index.js
vendored
@@ -133,6 +133,7 @@ const childProcess = __importStar(__webpack_require__(129));
|
|||||||
const path = __importStar(__webpack_require__(622));
|
const path = __importStar(__webpack_require__(622));
|
||||||
const util_1 = __webpack_require__(669);
|
const util_1 = __webpack_require__(669);
|
||||||
const ioUtil = __importStar(__webpack_require__(672));
|
const ioUtil = __importStar(__webpack_require__(672));
|
||||||
|
const exec = util_1.promisify(childProcess.exec);
|
||||||
const execFile = util_1.promisify(childProcess.execFile);
|
const execFile = util_1.promisify(childProcess.execFile);
|
||||||
/**
|
/**
|
||||||
* Copies a file or folder.
|
* Copies a file or folder.
|
||||||
@@ -224,17 +225,13 @@ function rmRF(inputPath) {
|
|||||||
try {
|
try {
|
||||||
const cmdPath = ioUtil.getCmdPath();
|
const cmdPath = ioUtil.getCmdPath();
|
||||||
if (yield ioUtil.isDirectory(inputPath, true)) {
|
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 }
|
env: { inputPath }
|
||||||
}).catch(error => {
|
|
||||||
throw new Error(`Failed to remove directory: ${error.message}`);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
yield execFile(`${cmdPath} /s /c "del /f /a "%inputPath%""`, {
|
yield exec(`${cmdPath} /s /c "del /f /a "%inputPath%""`, {
|
||||||
env: { 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
|
// Shelling out fails to remove a symlink folder with missing source, this unlink catches that
|
||||||
try {
|
try {
|
||||||
yield ioUtil.unlink(ioUtil.normalizeSeparators(inputPath));
|
yield ioUtil.unlink(inputPath);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
// if you try to delete a file that doesn't exist, desired result is achieved
|
// 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
|
// Try to override file permission
|
||||||
if (e.code === 'EPERM') {
|
if (e.code === 'EPERM') {
|
||||||
yield ioUtil.chmod(destFile, '0666');
|
yield ioUtil.chmod(destFile, '0666');
|
||||||
yield ioUtil.rmdir(destFile);
|
yield ioUtil.unlink(destFile);
|
||||||
}
|
}
|
||||||
// other errors = it doesn't exist, no work to do
|
// other errors = it doesn't exist, no work to do
|
||||||
}
|
}
|
||||||
@@ -7209,14 +7206,7 @@ class GitAuthHelper {
|
|||||||
if (((_a = this.temporaryHomePath) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
if (((_a = this.temporaryHomePath) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
||||||
core.debug(`Unsetting HOME override`);
|
core.debug(`Unsetting HOME override`);
|
||||||
this.git.removeEnvironmentVariable('HOME');
|
this.git.removeEnvironmentVariable('HOME');
|
||||||
core.info(`hi there: ${this.temporaryHomePath}`);
|
yield io.rmRF(this.temporaryHomePath);
|
||||||
yield io
|
|
||||||
.rmRF(this.temporaryHomePath)
|
|
||||||
// eslint-disable-next-line github/no-then
|
|
||||||
.catch(err => {
|
|
||||||
// eslint-disable-next-line i18n-text/no-en
|
|
||||||
core.warning(`Failed to remove temporary checkout directory: ${err}`);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -59,8 +59,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@actions/io": {
|
"@actions/io": {
|
||||||
"version": "file:actions-io-1.1.4.tgz",
|
"version": "file:actions-io-1.1.3.tgz",
|
||||||
"integrity": "sha512-JM4u7MrkRNjgr8wveZbtihhESfGR6lfV819G1yLWVF1yIhoVkRpVElv28kYFvrh8iU0rWE6VmrOHuZPpspGlcQ=="
|
"integrity": "sha512-GJsPQzUKCnXjTYzTIyA0lfY3vpTCrD2+YyyQEq7WakKF5c7YPR2Ox3PjMnPrSWvseAkEOXz1ZfcidXN7EqLn5w=="
|
||||||
},
|
},
|
||||||
"@actions/tool-cache": {
|
"@actions/tool-cache": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"description": "checkout action",
|
"description": "checkout action",
|
||||||
"main": "lib/main.js",
|
"main": "lib/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build-full": "npm run format && npm run build && npm run test",
|
"build-full": "npm i --package-lock && npm ci && npm run format && npm run build && npm run test",
|
||||||
"build": "tsc && ncc build && node lib/misc/generate-docs.js",
|
"build": "tsc && ncc build && node lib/misc/generate-docs.js",
|
||||||
"format": "prettier --write '**/*.ts'",
|
"format": "prettier --write '**/*.ts'",
|
||||||
"format-check": "prettier --check '**/*.ts'",
|
"format-check": "prettier --check '**/*.ts'",
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/exec": "^1.0.1",
|
"@actions/exec": "^1.0.1",
|
||||||
"@actions/github": "^2.2.0",
|
"@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",
|
"@actions/tool-cache": "^1.1.2",
|
||||||
"uuid": "^3.3.3"
|
"uuid": "^3.3.3"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -197,15 +197,7 @@ class GitAuthHelper {
|
|||||||
if (this.temporaryHomePath?.length > 0) {
|
if (this.temporaryHomePath?.length > 0) {
|
||||||
core.debug(`Unsetting HOME override`)
|
core.debug(`Unsetting HOME override`)
|
||||||
this.git.removeEnvironmentVariable('HOME')
|
this.git.removeEnvironmentVariable('HOME')
|
||||||
|
await io.rmRF(this.temporaryHomePath)
|
||||||
core.info(`hi there: ${this.temporaryHomePath}`)
|
|
||||||
await io
|
|
||||||
.rmRF(this.temporaryHomePath)
|
|
||||||
// eslint-disable-next-line github/no-then
|
|
||||||
.catch(err => {
|
|
||||||
// eslint-disable-next-line i18n-text/no-en
|
|
||||||
core.warning(`Failed to remove temporary checkout directory: ${err}`)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user