NLeSC / software.esciencecenter.nl

eStep website with projects software and people.
http://software.esciencecenter.nl
Other
4 stars 3 forks source link

generator breaks files when it crashes #93

Open nielsdrost opened 8 years ago

nielsdrost commented 8 years ago

If the generator crashes (especially during the writing of files) it leaves these files in a "broken" state.

blootsvoets commented 8 years ago

Ah, you're right. It would be nicer to write to a temporary file, catch any errors, and only move the written file if no errors were raised.

nielsdrost commented 8 years ago

Perhaps create the content as a string? Moving temp files around can also go wrong ;-)

blootsvoets commented 8 years ago

yeah... opening a file to write and then realising you can't write the string also doesn't help though. Our first thought was: people can always revert using git checkout. But of course if there was no commit in between, that's kinda annoying.