Set the initial disk image size for mac packages.

Various stackoverflow answers suggest that setting an initial size can avoid errors while resizing the disk during the process of creating it.
This commit is contained in:
Josh Matthews 2017-06-04 23:23:14 -04:00
parent c260c6ede0
commit e62f98d100

View file

@ -274,7 +274,11 @@ class PackageCommands(CommandBase):
os.remove(dmg_path)
try:
subprocess.check_call(['hdiutil', 'create', '-volname', 'Servo', dmg_path, '-srcfolder', dir_to_dmg])
subprocess.check_call(['hdiutil', 'create',
'-volname', 'Servo',
'-megabytes', '900',
dmg_path,
'-srcfolder', dir_to_dmg])
except subprocess.CalledProcessError as e:
print("Packaging MacOS dmg exited with return value %d" % e.returncode)
return e.returncode