clan_cli: remove incorrect clan_flake check
This commit is contained in:
@@ -8,7 +8,7 @@ from typing import Any
|
|||||||
|
|
||||||
from . import backups, config, flakes, history, machines, secrets, vms
|
from . import backups, config, flakes, history, machines, secrets, vms
|
||||||
from .custom_logger import setup_logging
|
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
|
from .ssh import cli as ssh_cli
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@@ -66,10 +66,6 @@ def create_parser(prog: str | None = None) -> argparse.ArgumentParser:
|
|||||||
raise argparse.ArgumentTypeError(
|
raise argparse.ArgumentTypeError(
|
||||||
f"flake directory {flake_dir} is not a directory"
|
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
|
return flake_dir
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
|||||||
@@ -10,10 +10,6 @@ def get_clan_flake_toplevel() -> Path | None:
|
|||||||
return find_toplevel([".clan-flake", ".git", ".hg", ".svn", "flake.nix"])
|
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:
|
def find_git_repo_root() -> Path | None:
|
||||||
return find_toplevel([".git"])
|
return find_toplevel([".git"])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user