Skip to content

Commit c80d820

Browse files
authored
fix: GAPIC generation failed with 'Directory not empty' (#1542)
1 parent b4ce8da commit c80d820

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

owlbot.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import json
1818
from pathlib import Path
19+
import shutil
1920

2021
import synthtool as s
2122
from synthtool import gcp
@@ -49,6 +50,11 @@
4950

5051
source_path = Path("google/cloud/storage_v2")
5152
renamed_path = Path("google/cloud/_storage_v2")
53+
54+
# Remove the old _storage_v2 directory if it exists
55+
if renamed_path.exists():
56+
shutil.rmtree(renamed_path)
57+
5258
if source_path.exists():
5359
source_path.rename(renamed_path)
5460

0 commit comments

Comments
 (0)