asticode / go-astilectron

Build cross platform GUI apps with GO and HTML/JS/CSS (powered by Electron)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Auto-delete temporary zip files after downloading Electron?

koddr opened this issue · comments

Hi,

How to auto-delete temporary files after downloading Electron?

Screenshot 2022-01-06 at 23 15 49

For example, the file electron-darwin-amd64-v16.0.5.zip weighs as much as 83.4 Mb!

Right now there's no option to do so, but that's a really good idea.

I won't have time to work on this anytime soon, but I'm welcoming PRs. If you feel like submitting a PR I can guide you about the changes to make.

Oh, I see. Okay, I'll try to add that, just please tell me where to look for the Electron source download call in your library?

Removing file located at pathUnzipSrc after finish here should make the trick

please tell me where to look for the Electron source download call in your library?

In the provisionPackage that provide the finish

where is a function finish func() error

And the finish function will only be executed when a download is required

so we can add os.remove on it.

I will add PRs. later.


Hi @asticode

Is there a need to add some optional (that is, you can choose to keep or delete)? I think you should have considered this issue but finally chose to stay. I'm curious about why you chose to stay.