pkgs/clan/lib: Handle basecase of directory functionality
This commit is contained in:
@@ -225,6 +225,10 @@ def get_clan_directories(flake: "Flake") -> tuple[str, str]:
|
|||||||
root_path = Path(root_directory)
|
root_path = Path(root_directory)
|
||||||
directory_path = Path(directory)
|
directory_path = Path(directory)
|
||||||
|
|
||||||
|
# No custom directory is set
|
||||||
|
if root_path == directory_path:
|
||||||
|
return (root_directory, "")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
relative_path = directory_path.relative_to(root_path)
|
relative_path = directory_path.relative_to(root_path)
|
||||||
return (root_directory, str(relative_path))
|
return (root_directory, str(relative_path))
|
||||||
|
|||||||
Reference in New Issue
Block a user