From 865c9207605425ca21e0d3e37fa51027090603b7 Mon Sep 17 00:00:00 2001 From: Alexander Hughes Date: Wed, 10 Jul 2019 22:28:58 -0500 Subject: [PATCH] Bugfix: Decrypt files.write wrong arg order files.write expects data, path When using the -o option in decrypt, files.write was being called with path, data leading to errors with filenames being too long (because they were the contents of the file instead). Change-Id: I2b00669227de94ebe6ced51d5ef25686de0c8a4b --- pegleg/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pegleg/cli.py b/pegleg/cli.py index e2d10f05..b78090c8 100644 --- a/pegleg/cli.py +++ b/pegleg/cli.py @@ -669,7 +669,7 @@ def decrypt(*, path, save_location, overwrite, site_name): decrypted = engine.secrets.decrypt(path, site_name=site_name) if overwrite: for path, data in decrypted.items(): - files.write(path, data) + files.write(data, path) elif save_location is None: for data in decrypted.values(): click.echo(data)