clan_cli: remove incorrect clan_flake check

This commit is contained in:
lassulus
2023-12-16 20:58:58 +01:00
parent 56dafff109
commit e98f037dd8
2 changed files with 1 additions and 9 deletions

View File

@@ -8,7 +8,7 @@ from typing import Any
from . import backups, config, flakes, history, machines, secrets, vms
from .custom_logger import setup_logging
from .dirs import get_clan_flake_toplevel, is_clan_flake
from .dirs import get_clan_flake_toplevel
from .ssh import cli as ssh_cli
log = logging.getLogger(__name__)
@@ -66,10 +66,6 @@ def create_parser(prog: str | None = None) -> argparse.ArgumentParser:
raise argparse.ArgumentTypeError(
f"flake directory {flake_dir} is not a directory"
)
if not is_clan_flake(flake_dir):
raise argparse.ArgumentTypeError(
f"flake directory {flake_dir} is not a clan flake"
)
return flake_dir
parser.add_argument(

View File

@@ -10,10 +10,6 @@ def get_clan_flake_toplevel() -> Path | None:
return find_toplevel([".clan-flake", ".git", ".hg", ".svn", "flake.nix"])
def is_clan_flake(path: Path) -> bool:
return (path / ".clan-flake").exists()
def find_git_repo_root() -> Path | None:
return find_toplevel([".git"])