From 47af75e4d6f5b5d044caa2b7c400d01b2a743193 Mon Sep 17 00:00:00 2001 From: Declan Qian Date: Fri, 28 Jan 2022 20:39:22 +0800 Subject: [PATCH] use screencapture when found on system-type darwin --- password-store-otp.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/password-store-otp.el b/password-store-otp.el index 2ec69ea..74c86f5 100644 --- a/password-store-otp.el +++ b/password-store-otp.el @@ -46,7 +46,8 @@ (defun password-store-otp--get-screenshot-executable () "Return the name of the executable that should be used to take screenshots." - (if (eq window-system 'mac) "screencapture" "import")) + (if (and (eq system-type 'darwin) + (executable-find "screencapture")) "screencapture" "import")) (defun password-store-otp--otpauth-lines (lines) "Return from LINES those that are OTP urls."