Skip to content

Commit

Permalink
[process] only remove if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaccBarker committed Nov 19, 2023
1 parent 289c1cf commit 80a22e4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions process/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,11 @@ def main():

print('(runtime) ' + input + ' -> ' + output + '...')

shutil.rmtree(output)
shutil.copytree(input, output)
try:
shutil.copytree(input, output)
except FileExistsError as e:
shutil.rmtree(output)
shutil.copytree(input, output)

favicon_input = specification['favicon']
favicon_output = specification['output'] + os.sep + favicon_input.split(os.sep)[-1]
Expand Down

0 comments on commit 80a22e4

Please sign in to comment.