diff --git a/tools/setup_presubmit_repos.py b/tools/setup_presubmit_repos.py index 9dc84f018aa..8034003e288 100644 --- a/tools/setup_presubmit_repos.py +++ b/tools/setup_presubmit_repos.py @@ -135,7 +135,7 @@ def main(): logging.info("Creating anonymous module repo at: %s", anonymous_module_root) try: shutil.rmtree(anonymous_module_root, ignore_errors=True) - os.makedirs(anonymous_module_root, exist_ok=True) + anonymous_module_root.mkdir(exist_ok=True, parents=True) bcr_presubmit.create_anonymous_repo(module_name, module_version, anonymous_module_root) logging.info("Anonymous module repo ready at: %s", anonymous_module_root) print_build_instruction(module_name, module_version, anonymous_module_root, anonymous_module_task_config)