diff --git a/assets/install.ps1 b/assets/install.ps1 index 5be61aa8..45e9b7c2 100644 --- a/assets/install.ps1 +++ b/assets/install.ps1 @@ -103,7 +103,13 @@ def main(): print 'Aborted!' sys.exit() - shutil.rmtree(get_location()) + def report_error(func, path, excinfo): + print('Problem deleting {}, {}, {}'.format(func, path, excinfo)) + print('Please try and delete {} manually'.format(get_location()) + print('Aborted!') + sys.exit() + + shutil.rmtree(get_location(), onerror=report_error) print ' Installing at: %s' % install_dir