From 235e6cd704c2f66994bafbf7faa9a99bdabc5eb5 Mon Sep 17 00:00:00 2001 From: Adnan Dautovic Date: Thu, 20 Feb 2025 09:29:53 +0100 Subject: [PATCH] Fix reading multiline secrets (e.g. files) --- onepassword/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onepassword/client.py b/onepassword/client.py index af0bc0d..0203755 100644 --- a/onepassword/client.py +++ b/onepassword/client.py @@ -465,7 +465,7 @@ def read(secret_ref: str): if not secret_ref or not isinstance(secret_ref, str): raise ValueError("secret_ref must be a non-empty string") - return read_bash_return("op read '{}'".format(secret_ref)) + return read_bash_return("op read '{}'".format(secret_ref), single=False).removesuffix('\n') @staticmethod def get_item_otp(uuid: str | bytes):