From c1e0b04122703058042e4c710a98674026e17ae5 Mon Sep 17 00:00:00 2001 From: ptrcnull Date: Sun, 7 Apr 2024 11:35:35 +0200 Subject: [PATCH] fix: reverse Pathlib.hardlink_to arguments > Note the order of arguments (self, target) is the reverse of os.link's. fuck off --- nyacme/__main__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nyacme/__main__.py b/nyacme/__main__.py index 000f235..9f61e98 100644 --- a/nyacme/__main__.py +++ b/nyacme/__main__.py @@ -70,7 +70,7 @@ def main() -> None: domain_pem = output_dir / domain / 'cert.pem' domain_key.unlink(missing_ok=True) - private_key.hardlink_to(domain_key) + domain_key.hardlink_to(private_key) # TODO: add user/group to config shutil.chown(domain_key, 'acme', 'acme') domain_key.chmod(0o440) @@ -79,9 +79,9 @@ def main() -> None: all_key = output_dir / 'all' / f'{domain}.pem.key' all_pem.unlink(missing_ok=True) - domain_pem.hardlink_to(all_pem) + all_pem.hardlink_to(domain_pem) all_key.unlink(missing_ok=True) - domain_key.hardlink_to(all_key) + all_key.hardlink_to(domain_key) if acquired: for cmd in config.post_acquire: