Don't rmdir directories that git rm has already taken care of
This commit is contained in:
parent
735390e070
commit
599082cd5a
1 changed files with 3 additions and 1 deletions
|
@ -227,7 +227,9 @@ class Addon(object):
|
|||
|
||||
if os.path.isdir(relpath):
|
||||
self._rmtree(relpath, exclude)
|
||||
self._execute(["rmdir", "--ignore-fail-on-non-empty", relpath])
|
||||
# git rm removes directories that it empties
|
||||
if os.path.exists(relpath):
|
||||
self._execute(["rmdir", "--ignore-fail-on-non-empty", relpath])
|
||||
else:
|
||||
self._execute(["git", "rm", relpath], check_error=True)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue