From eebf452d38b79bb2ea1a1ba84c3d2ea6f2f9f899 Mon Sep 17 00:00:00 2001
From: Nadhir <79141224+nadhirhb@users.noreply.github.com>
Date: Wed, 29 Sep 2021 15:21:38 +0100
Subject: [PATCH] fix: add support for relative install paths to BrowserFetcher
 (#7613)

This patch fixes the BrowserFetcher._getFolderPath method so that it supports relative download paths using PUPPETEER_DOWNLOAD_PATH or npm config

Issues: #7592
---
 src/node/BrowserFetcher.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/node/BrowserFetcher.ts b/src/node/BrowserFetcher.ts
index d5f25708..01140df4 100644
--- a/src/node/BrowserFetcher.ts
+++ b/src/node/BrowserFetcher.ts
@@ -419,7 +419,7 @@ export class BrowserFetcher {
    * @internal
    */
   _getFolderPath(revision: string): string {
-    return path.join(this._downloadsFolder, `${this._platform}-${revision}`);
+    return path.resolve(this._downloadsFolder, `${this._platform}-${revision}`);
   }
 }