From 44ef9824dd7914959810630311c2a9e95ec57f40 Mon Sep 17 00:00:00 2001 From: tombogle Date: Fri, 5 Jan 2024 10:50:17 -0500 Subject: [PATCH] #567: Turn on globbing in rimrafSync calls to prevent "Illegal characters in path" error --- .erb/scripts/clean.js | 2 +- .erb/scripts/delete-source-maps.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.erb/scripts/clean.js b/.erb/scripts/clean.js index 07c0bc2270..fd7eab8c1c 100644 --- a/.erb/scripts/clean.js +++ b/.erb/scripts/clean.js @@ -10,5 +10,5 @@ const foldersToRemove = [ ]; foldersToRemove.forEach((folder) => { - if (fs.existsSync(folder)) rimrafSync(folder); + if (fs.existsSync(folder)) rimrafSync(folder, { glob: true }); }); diff --git a/.erb/scripts/delete-source-maps.js b/.erb/scripts/delete-source-maps.js index e8ab8669de..3c40d2d856 100644 --- a/.erb/scripts/delete-source-maps.js +++ b/.erb/scripts/delete-source-maps.js @@ -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 }); }