Skip to content

Commit

Permalink
fix: join the path in case slashes are missing
Browse files Browse the repository at this point in the history
  • Loading branch information
knownasilya committed Feb 15, 2019
1 parent 1e7260f commit 57d314b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/models/asset-size-printer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down

0 comments on commit 57d314b

Please sign in to comment.