From 8215c935bf00f9decb16ba5bb5816a3b3312e54d Mon Sep 17 00:00:00 2001 From: Nadhir <79141224+nadhirhb@users.noreply.github.com> Date: Wed, 29 Sep 2021 13:07:46 +0100 Subject: [PATCH 1/2] fix: fix BrowserFetcher._getFolderPath to support relative install paths 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/node/BrowserFetcher.ts b/src/node/BrowserFetcher.ts index d5f25708e1ff6..9607606eb032d 100644 --- a/src/node/BrowserFetcher.ts +++ b/src/node/BrowserFetcher.ts @@ -419,7 +419,9 @@ export class BrowserFetcher { * @internal */ _getFolderPath(revision: string): string { - return path.join(this._downloadsFolder, `${this._platform}-${revision}`); + return path.resolve( + path.join(this._downloadsFolder, `${this._platform}-${revision}`) + ); } } From e402ce34cd2a280553732553119717433e56a959 Mon Sep 17 00:00:00 2001 From: Nadhir <79141224+nadhirhb@users.noreply.github.com> Date: Wed, 29 Sep 2021 14:09:22 +0100 Subject: [PATCH 2/2] fix: fix BrowserFetcher._getFolderPath to support relative install paths 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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/node/BrowserFetcher.ts b/src/node/BrowserFetcher.ts index 9607606eb032d..01140df4c487b 100644 --- a/src/node/BrowserFetcher.ts +++ b/src/node/BrowserFetcher.ts @@ -419,9 +419,7 @@ export class BrowserFetcher { * @internal */ _getFolderPath(revision: string): string { - return path.resolve( - path.join(this._downloadsFolder, `${this._platform}-${revision}`) - ); + return path.resolve(this._downloadsFolder, `${this._platform}-${revision}`); } }