From 0b611e6c46b3a16d8b14df9ffde6c55f6ea88ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Fri, 8 Nov 2024 17:00:09 +0100 Subject: [PATCH] docker/install: Clean up toolDir in teardown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `toolDir` is added to `PATH` on install, so make sure the binaries aren't accessible after a teardown. Signed-off-by: Paweł Gronowski --- src/docker/install.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/docker/install.ts b/src/docker/install.ts index e3c1629..0c0203d 100644 --- a/src/docker/install.ts +++ b/src/docker/install.ts @@ -492,6 +492,13 @@ EOF`, throw new Error(`Unsupported platform: ${os.platform()}`); } } + + await core.group(`Cleaning up toolDir`, async () => { + if (!this._toolDir) { + return; + } + fs.rmSync(this._toolDir, {recursive: true, force: true}); + }); } private async tearDownDarwin(): Promise {