1
0
Fork 0
mirror of https://code.forgejo.org/actions/checkout.git synced 2024-12-01 00:19:15 +01:00

updating error handling

This commit is contained in:
Vallie Joseph 2022-12-06 04:06:53 +00:00
parent 669961e207
commit 24ec60a7c8
2 changed files with 14 additions and 2 deletions

8
dist/index.js vendored
View file

@ -7204,7 +7204,13 @@ class GitAuthHelper {
if (((_a = this.temporaryHomePath) === null || _a === void 0 ? void 0 : _a.length) > 0) {
core.debug(`Unsetting HOME override`);
this.git.removeEnvironmentVariable('HOME');
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 home directory: ${err}`);
});
}
});
}

View file

@ -197,7 +197,13 @@ class GitAuthHelper {
if (this.temporaryHomePath?.length > 0) {
core.debug(`Unsetting HOME override`)
this.git.removeEnvironmentVariable('HOME')
await io.rmRF(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 home directory: ${err}`)
})
}
}