electron / asar

Simple extensive tar-like archive format with indexing
MIT License
2.54k stars 246 forks source link

unpack/unpack-dir are broken #228

Open Treverix opened 2 years ago

Treverix commented 2 years ago

I try to exclude node_modules/electron from the asar using this command, which I think, should do exactly this:

npx asar pack . app.asar --unpack-dir "node_modules/electron"

Now, when we look into the asar.app.unpacked folder, we find the files for node_modules/electron and also all files for all libraries like node_modules/electron* - for example, node_modules/electron-redux.

Then, when we do npx list app.asar, we see that node_modules/electron is still packaged (and the others also).

I expect, from the documentation, that it would just exclude that folder and not all, that simply start with the pattern, as that's what it says on the readme. And then, it actually does not exclude.

Jaifroid commented 1 year ago

Agreed, the documentation talks of "excluding" directories with --unpack-dir, but they are packed anyway and then duplicated in the unpacked directory.

mmaietta commented 1 year ago

I've been trying to figure out the same thing. From what I can discern, it is creating a symlink between the file in the app.asar and the app.asar.unpacked. Seems to be the case as when I delete app.asar.unpacked folder, the electron app is no longer able to be run (even though app.asar shows the "files" embedded in the asar ----> symlink?)