Skip to content

Commit

Permalink
#567: Turn on globbing in rimrafSync calls to prevent "Illegal charac…
Browse files Browse the repository at this point in the history
…ters in path" error
  • Loading branch information
tombogle committed Jan 5, 2024
1 parent dd9b162 commit 44ef982
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .erb/scripts/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ const foldersToRemove = [
];

foldersToRemove.forEach((folder) => {
if (fs.existsSync(folder)) rimrafSync(folder);
if (fs.existsSync(folder)) rimrafSync(folder, { glob: true });
});
4 changes: 2 additions & 2 deletions .erb/scripts/delete-source-maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import webpackPaths from '../configs/webpack.paths';

export default function deleteSourceMaps() {
if (fs.existsSync(webpackPaths.distMainPath))
rimrafSync(path.join(webpackPaths.distMainPath, '*.js.map'));
rimrafSync(path.join(webpackPaths.distMainPath, '*.js.map'), { glob: true });
if (fs.existsSync(webpackPaths.distRendererPath))
rimrafSync(path.join(webpackPaths.distRendererPath, '*.js.map'));
rimrafSync(path.join(webpackPaths.distRendererPath, '*.js.map'), { glob: true });
}

0 comments on commit 44ef982

Please sign in to comment.