mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-11-17 13:42:49 +00:00
Fix freeze build failure on macOS
This commit is contained in:
parent
a2086eb6a4
commit
5d42ead86f
1 changed files with 5 additions and 3 deletions
|
|
@ -514,11 +514,13 @@ class Freeze(object):
|
|||
os.symlink('/Applications', join(tdir, 'Applications'))
|
||||
size_in_mb = int(subprocess.check_output(['du', '-s', '-k', tdir]).decode('utf-8').split()[0]) / 1024.0
|
||||
cmd = ['/usr/bin/hdiutil', 'create', '-srcfolder', tdir, '-volname', volname, '-format', format]
|
||||
if 190 < size_in_mb < 250:
|
||||
# We need -size 255m because of a bug in hdiutil. When the size of
|
||||
if size_in_mb > 190:
|
||||
# We need an explicit -size because of a bug in hdiutil. When the size of
|
||||
# srcfolder is close to 200MB hdiutil fails with
|
||||
# diskimages-helper: resize request is above maximum size allowed.
|
||||
cmd += ['-size', '255m']
|
||||
# Leave headroom for filesystem overhead, otherwise hdiutil fails
|
||||
# with No space left on device.
|
||||
cmd += ['-size', f'{max(255, int(size_in_mb * 1.2) + 32)}m']
|
||||
print('\nCreating dmg...')
|
||||
with timeit() as times:
|
||||
subprocess.check_call(cmd + [dmg])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue