aws / ec2-macos-init

EC2 macOS Init is the launch daemon used to initialize Mac instances within EC2.
https://aws.amazon.com/ec2/instance-types/mac/
Apache License 2.0
150 stars 19 forks source link

feat: add safe write functionality #24

Closed dpakpak closed 1 year ago

dpakpak commented 1 year ago

Issue #, if available:

Description of changes: Added functionality to write safely to files. The history file would sometimes have a partial write leaving the history file created but empty, causing ec2-macos-init to not be able to parse the history file.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

dpakpak commented 1 year ago

Only the 1st, 2nd, and Last commits are important. The other commits were all reverted.

dpakpak commented 1 year ago

Resolved merge conflicts in instancehistory.go

jahkeup commented 1 year ago

@dpakpak @mattcataws before we merge this, let's meet up and squash the commits into a tidy set of commits 👍🏽