diff options
-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 d49c1e431c9..c075c2449b5 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -316,7 +316,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: |