We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb78536 commit 8df2e49Copy full SHA for 8df2e49
misc/bazel/internal/install.py
@@ -47,17 +47,20 @@
47
if platform.system() == 'Windows':
48
# On Windows we might have virus scanner still looking at the path so
49
# attempt removal a couple of times sleeping between each attempt.
50
- for attempt in [1, 2]:
+ for retry_delay in [1, 2, 2]:
51
try:
52
shutil.rmtree(destdir)
53
break
54
except OSError as e:
55
if e.winerror == 32:
56
- time.sleep(attempt)
+ time.sleep(retry_delay)
57
else:
58
raise
59
+ else:
60
+ shutil.rmtree(destdir)
61
62
63
+
64
destdir.mkdir(parents=True, exist_ok=True)
65
subprocess.run([script, "--destdir", destdir], check=True)
66
0 commit comments