Skip to content

Commit

Permalink
Cleanup dst prior to checkout-index (#63)
Browse files Browse the repository at this point in the history
Extract can leave files behind. This patch removes the dest
prior to checkout-index.
  • Loading branch information
retr0h authored Aug 20, 2018
1 parent b2e098a commit 4d6aee1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gilt/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ def extract(repository, destination, version, debug=False):
:return: None
"""
with util.saved_cwd():
if os.path.isdir(destination):
shutil.rmtree(destination)

os.chdir(repository)
_get_version(version, debug)
cmd = sh.git.bake(
Expand Down

0 comments on commit 4d6aee1

Please sign in to comment.