sops: also log content type on error
This commit is contained in:
@@ -175,7 +175,7 @@ def encrypt_file(
|
|||||||
with open(f.name, "w") as fd:
|
with open(f.name, "w") as fd:
|
||||||
shutil.copyfileobj(content, fd)
|
shutil.copyfileobj(content, fd)
|
||||||
else:
|
else:
|
||||||
raise ClanError("Invalid content type")
|
raise ClanError(f"Invalid content type: {type(content)}")
|
||||||
# we pass an empty manifest to pick up existing configuration of the user
|
# we pass an empty manifest to pick up existing configuration of the user
|
||||||
args = ["sops", "--config", str(manifest)]
|
args = ["sops", "--config", str(manifest)]
|
||||||
args.extend(["-i", "--encrypt", str(f.name)])
|
args.extend(["-i", "--encrypt", str(f.name)])
|
||||||
|
|||||||
Reference in New Issue
Block a user