Skip to content

Commit

Permalink
fix: EINVAL: invalid argument, rmdir
Browse files Browse the repository at this point in the history
fix

An unhandled rejection has occurred inside Forge:
Error: EINVAL: invalid argument, rmdir '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/electron-packager/darwin-x64/TidGi-darwin-x64-7z9HIz/Electron.app/Contents/Resources/app/.webpack/main/native_modules/dist/Electron.app/Contents/Frameworks'
  • Loading branch information
linonetwo committed Dec 18, 2022
1 parent 0671c64 commit b550bef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/beforeAsar.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports.default = async (buildPath, electronVersion, platform, arch, callback) =
const duplicatedLocalization = glob.sync('**/.webpack/main/localization/**', { cwd });
const duplicatedElectronDist = glob.sync('**/.webpack/main/native_modules/dist/**', { cwd });
const pathsToRemove = [...duplicatedLocalization, ...duplicatedElectronDist].map((directory) => path.join(cwd, directory));
await Promise.all(pathsToRemove.map((directory) => fs.remove(directory)));
await Promise.all(pathsToRemove.map((directory) => fs.remove(directory).catch((error) => console.error(error))));

/** complete this hook */
callback();
Expand Down

0 comments on commit b550bef

Please sign in to comment.