Skip to content

Commit

Permalink
Delete any existing dmg before recreating it.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdm committed Apr 1, 2017
1 parent 325713a commit 3dd74bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/servo/package_commands.py
Expand Up @@ -256,6 +256,10 @@ def package(self, release=False, dev=False, android=None, debug=False, debugger=
os.symlink('/Applications', path.join(dir_to_dmg, 'Applications'))
dmg_path = path.join(target_dir, "servo-tech-demo.dmg")

if path.exists(dmg_path):
print("Deleting existing dmg")
os.remove(dmg_path)

try:
subprocess.check_call(['hdiutil', 'create', '-volname', 'Servo', dmg_path, '-srcfolder', dir_to_dmg])
except subprocess.CalledProcessError as e:
Expand Down

0 comments on commit 3dd74bb

Please sign in to comment.