From 24ec60a7c8854d770fe9cf4862c3213eac2a9a7d Mon Sep 17 00:00:00 2001
From: Vallie Joseph <vmjoseph@github.com>
Date: Tue, 6 Dec 2022 04:06:53 +0000
Subject: [PATCH] updating error handling

---
 dist/index.js          | 8 +++++++-
 src/git-auth-helper.ts | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/dist/index.js b/dist/index.js
index 4ba9ad6..64d9e71 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -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}`);
+                });
             }
         });
     }
diff --git a/src/git-auth-helper.ts b/src/git-auth-helper.ts
index 6e3ad28..73a7a0b 100644
--- a/src/git-auth-helper.ts
+++ b/src/git-auth-helper.ts
@@ -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}`)
+        })
     }
   }