diff --git a/dist/index.js b/dist/index.js index bdd7187..10eb642 100644 --- a/dist/index.js +++ b/dist/index.js @@ -446,11 +446,12 @@ class GitAuthHelper { */ removeSsh() { return __awaiter(this, void 0, void 0, function* () { - var _a; + var _a, _b; // SSH key const keyPath = this.sshKeyPath || stateHelper.SshKeyPath; if (keyPath) { try { + core.info(`Removing SSH key '${keyPath}'`); yield io.rmRF(keyPath); } catch (err) { @@ -462,13 +463,16 @@ class GitAuthHelper { const knownHostsPath = this.sshKnownHostsPath || stateHelper.SshKnownHostsPath; if (knownHostsPath) { try { + core.info(`Removing SSH known hosts '${knownHostsPath}'`); yield io.rmRF(knownHostsPath); } - catch (_b) { - // Intentionally empty + catch (err) { + core.debug(`${(_b = err === null || err === void 0 ? void 0 : err.message) !== null && _b !== void 0 ? _b : err}`); + core.warning(`Failed to remove SSH known hosts '${knownHostsPath}'`); } } // SSH command + core.info("Removing SSH command configuration"); yield this.removeGitConfig(SSH_COMMAND_KEY); yield this.removeSubmoduleGitConfig(SSH_COMMAND_KEY); }); diff --git a/src/git-auth-helper.ts b/src/git-auth-helper.ts index 32510a8..8bec327 100644 --- a/src/git-auth-helper.ts +++ b/src/git-auth-helper.ts @@ -423,6 +423,7 @@ class GitAuthHelper { const keyPath = this.sshKeyPath || stateHelper.SshKeyPath if (keyPath) { try { + core.info(`Removing SSH key '${keyPath}'`) await io.rmRF(keyPath) } catch (err) { core.debug(`${(err as any)?.message ?? err}`) @@ -435,13 +436,16 @@ class GitAuthHelper { this.sshKnownHostsPath || stateHelper.SshKnownHostsPath if (knownHostsPath) { try { + core.info(`Removing SSH known hosts '${knownHostsPath}'`) await io.rmRF(knownHostsPath) - } catch { - // Intentionally empty + } catch (err) { + core.debug(`${(err as any)?.message ?? err}`) + core.warning(`Failed to remove SSH known hosts '${knownHostsPath}'`) } } // SSH command + core.info("Removing SSH command configuration") await this.removeGitConfig(SSH_COMMAND_KEY) await this.removeSubmoduleGitConfig(SSH_COMMAND_KEY) }