diff options
Diffstat (limited to 'python/servo/bootstrap_commands.py')
-rw-r--r-- | python/servo/bootstrap_commands.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index 044cd8c80c4..5630b778771 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -319,7 +319,10 @@ class MachCommands(CommandBase): name = path.join(base, name) if force: print("Removing " + name) - shutil.rmtree(name) + if os.path.isdir(name): + shutil.rmtree(name) + else: + os.remove(name) else: print("Would remove " + name) if not removing_anything: |