From a395d4a8fbe97ef51ef602abc62b22352a27ecb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 22 Mar 2024 16:33:32 +0100 Subject: [PATCH] add hint to use --force when a key already exists --- pkgs/clan-cli/clan_cli/secrets/sops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/clan-cli/clan_cli/secrets/sops.py b/pkgs/clan-cli/clan_cli/secrets/sops.py index f245c95d5..3a88a326b 100644 --- a/pkgs/clan-cli/clan_cli/secrets/sops.py +++ b/pkgs/clan-cli/clan_cli/secrets/sops.py @@ -202,7 +202,7 @@ def write_key(path: Path, publickey: str, overwrite: bool) -> None: flags |= os.O_EXCL fd = os.open(path / "key.json", flags) except FileExistsError: - raise ClanError(f"{path.name} already exists in {path}") + raise ClanError(f"{path.name} already exists in {path}. Use --force to overwrite.") with os.fdopen(fd, "w") as f: json.dump({"publickey": publickey, "type": "age"}, f, indent=2)