unable to delete asar file
midnight1994 opened this issue · 3 comments
midnight1994 commented
rimraf('/path/app.asar', function (err) { if (err) { throw err } console.log('success') })
The prompt was successful, but the asar file was not deleted. How can I solve this problem?
rajivkr commented
I tried to run the same code. rimraf was successfully able to delete asar file.
My code reference here
It is working fine. Probably you can try upgrading rimraf or re-installing it again.
dancastellon commented
A workaround I discovered. I renamed app.asar
to appasar
and ran rimraf against appasar
. That worked.
hgouveia commented
by default electron will try to process .asar files, activating this flag process.noAsar = true;
will be treating an asar archive as a normal file,
you can this only when using rimfar for example
process.noAsar = true;
rimraf(somePath, (err) => {
process.noAsar = false;
//....
});