From 1e7260fcb53f062ca5ab83117e20c5fad12142ab Mon Sep 17 00:00:00 2001 From: Ilya Radchenko Date: Thu, 14 Feb 2019 17:33:23 -0500 Subject: [PATCH 1/2] fix: don't add extra slash in dist paths --- lib/models/asset-size-printer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/models/asset-size-printer.js b/lib/models/asset-size-printer.js index 1e85a366d2..e8a3bccba2 100644 --- a/lib/models/asset-size-printer.js +++ b/lib/models/asset-size-printer.js @@ -84,7 +84,7 @@ module.exports = class AssetPrinterSize { return walkSync(outputPath, { directories: false, }).filter(x => x.endsWith('.css') || x.endsWith('.js')) - .map(x => `${outputPath}/${x}`); + .map(x => `${outputPath}${x}`); } catch (e) { if (e !== null && typeof e === 'object' && e.code === 'ENOENT') { throw new Error(`No asset files found in the path provided: ${outputPath}`); From 57d314b855a6e3e0f7f201b63d3714320a8a7c99 Mon Sep 17 00:00:00 2001 From: Ilya Radchenko Date: Thu, 14 Feb 2019 21:00:30 -0500 Subject: [PATCH 2/2] fix: join the path in case slashes are missing --- lib/models/asset-size-printer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/models/asset-size-printer.js b/lib/models/asset-size-printer.js index e8a3bccba2..c1b854cd05 100644 --- a/lib/models/asset-size-printer.js +++ b/lib/models/asset-size-printer.js @@ -84,7 +84,7 @@ module.exports = class AssetPrinterSize { return walkSync(outputPath, { directories: false, }).filter(x => x.endsWith('.css') || x.endsWith('.js')) - .map(x => `${outputPath}${x}`); + .map(x => path.join(outputPath, x)); } catch (e) { if (e !== null && typeof e === 'object' && e.code === 'ENOENT') { throw new Error(`No asset files found in the path provided: ${outputPath}`);