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

Make sure we write, close, and only then exec #30

Closed jahkeup closed 1 year ago

jahkeup commented 1 year ago

Issue #, if available:

Fixes #29

Description of changes:

This addresses unreliable behavior where a userdata script may be partially written but not fully written, in the intended file, to disk.

Supporting refactors (for testing) and minimal test added.

@dpakpak plans to take the torch and add some more test cases - thanks!!

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