electron/asar

No error if asar file cannot be written to disk?

Nantris opened this issue · 4 comments

For example, if there's insufficient disk space, there doesn't seem to be any error?

This is the case whether the file is written incompletely or not at all. I'd expect an error.

@zcbenz @MarshallOfSound is this an intentional behavior? If so can you clue me into the rationale?

Is there any way you can suggest that one could gracefully handle errors during programmatic use?

Right now the only method that occurs me to me is to wait XX seconds for an operation to finish, and to assume that it failed if the time exceeds XX seconds, but that's pretty brittle.

It would be wonderful is asar threw an error when the file write failed in some capacity!

In lieu of an error, is there any way to verify the integrity of the entire file?

To clarify, I know the README says no errors are provided, but the reason I find this particular lack of error unexpected is that errors do seem to be provided upon failure to extract the archive in the same scenario (full disk.)

Actually, this is the only operation I've come across that actually adheres to the README - granted I'm not using half the functions.

Sorry for the late response. The project was initially only intended to be used as CLI tool so there was lack of error handling, but it is definitely not a good thing. Contributions to add error handling would be very welcomed.