Delete virtualenv when executing mach clean

Closes #22588
This commit is contained in:
Shanavas M 2019-01-03 09:51:05 +05:30
parent e68585a26f
commit 448f3c84a7

View file

@ -622,6 +622,11 @@ class MachCommands(CommandBase):
def clean(self, manifest_path=None, params=[], verbose=False): def clean(self, manifest_path=None, params=[], verbose=False):
self.ensure_bootstrapped() self.ensure_bootstrapped()
virtualenv_path = path.join(self.get_top_dir(), 'python', '_virtualenv')
if path.exists(virtualenv_path):
print('Removing virtualenv directory: %s' % virtualenv_path)
shutil.rmtree(virtualenv_path)
opts = [] opts = []
if manifest_path: if manifest_path:
opts += ["--manifest-path", manifest_path] opts += ["--manifest-path", manifest_path]