feat: try to find fallback conf with any name
This commit is contained in:
parent
8b16214be4
commit
dcb2035be3
|
@ -95,6 +95,7 @@ def convert(
|
||||||
app.pretty_exceptions_enable = False
|
app.pretty_exceptions_enable = False
|
||||||
logger.info(f"Converting files in {root.absolute()}")
|
logger.info(f"Converting files in {root.absolute()}")
|
||||||
for repo_toml_path in root.glob("**/repo.toml"):
|
for repo_toml_path in root.glob("**/repo.toml"):
|
||||||
|
if not any(p != repo_toml_path for p in repo_toml_path.parent.glob("*.toml")):
|
||||||
fallback_toml_path = repo_toml_path.parent / "conf.toml"
|
fallback_toml_path = repo_toml_path.parent / "conf.toml"
|
||||||
if not fallback_toml_path.exists():
|
if not fallback_toml_path.exists():
|
||||||
fallback_toml_path.write_text('name = "invalid commit"\n')
|
fallback_toml_path.write_text('name = "invalid commit"\n')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user