From 54f9204f726be139953e0df454ad94fc5109632e Mon Sep 17 00:00:00 2001 From: Gabriel Chamon Araujo Date: Fri, 26 Jun 2020 19:41:19 -0300 Subject: [PATCH] passing os environment variables to signin subprocess to get OP_DEVICE --- onepassword.py | 3 ++- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/onepassword.py b/onepassword.py index df9dcf4..52c889c 100644 --- a/onepassword.py +++ b/onepassword.py @@ -134,7 +134,8 @@ def get_access_token(self, secret, shorthand): f"{self.op} signin {secret['signin_address']} {secret['username']} {secret['secret_key']} " f"--output=raw --shorthand={shorthand}"), shell=True, - capture_output=True + capture_output=True, + env=os.environ ) process.check_returncode() return process.stdout.decode('UTF-8').strip() diff --git a/pyproject.toml b/pyproject.toml index f6c644c..335d4f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "onepassword" -version = "0.3.2" +version = "0.4.0" description = "Python wrapper for the 1password CLI" repository = "https://github.com/lettdigital/onepassword-python"