use rd on Windows (#224)

This commit is contained in:
James Xu 2019-07-15 10:44:09 -07:00 committed by Dirk Thomas
parent 422c8a392e
commit 71d5d01377
1 changed files with 4 additions and 1 deletions

View File

@ -190,7 +190,10 @@ def _rosclean_cmd_purge(args):
for d, label in dirs:
if not args.size:
print("Purging %s."%label)
cmds = [['rm', '-rf', d]]
if platform.system() == 'Windows':
cmds = [['rd', '/s', '/q', d]]
else:
cmds = [['rm', '-rf', d]]
try:
if args.y:
_call(cmds)