fix: try underscore variant when dash-slug path not found on disk
This commit is contained in:
parent
dd902ebb61
commit
015c5efbbd
1 changed files with 4 additions and 0 deletions
|
|
@ -306,6 +306,10 @@ def _infer_repo_path(folder_name: str) -> Path | None:
|
|||
direct = Path(ROOT_PATH) / slug
|
||||
if direct.exists() and direct.is_dir():
|
||||
return direct
|
||||
# Some repos use underscores where the slug has dashes
|
||||
direct_underscore = Path(ROOT_PATH) / slug.replace("-", "_")
|
||||
if direct_underscore.exists() and direct_underscore.is_dir():
|
||||
return direct_underscore
|
||||
# Fallback: walk up from the heuristic slash-replaced path
|
||||
path_str = "/" + folder_name.lstrip("-").replace("-", "/")
|
||||
p = Path(path_str)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue