aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/contrib/emacs
diff options
context:
space:
mode:
authorSvend Sorensen <svend@ciffer.net>2014-04-26 14:31:51 -0700
committerSvend Sorensen <svend@ciffer.net>2014-05-04 21:20:46 -0700
commit01af39e0db27c79e9f25e255ac6c75c8544e889b (patch)
tree25640df7673b145459135be339d7f00e744e6537 /contrib/emacs
parentRename pass executable variable (diff)
downloadpassword-store-01af39e0db27c79e9f25e255ac6c75c8544e889b.tar.xz
password-store-01af39e0db27c79e9f25e255ac6c75c8544e889b.zip
Remove nils from run argument list
Diffstat (limited to 'contrib/emacs')
-rw-r--r--contrib/emacs/Cask1
-rw-r--r--contrib/emacs/password-store.el7
2 files changed, 5 insertions, 3 deletions
diff --git a/contrib/emacs/Cask b/contrib/emacs/Cask
index 0b666e3..d595ea7 100644
--- a/contrib/emacs/Cask
+++ b/contrib/emacs/Cask
@@ -4,6 +4,7 @@
(package-file "password-store.el")
(development
+ (depends-on "dash")
(depends-on "f")
(depends-on "s")
(depends-on "ecukes")
diff --git a/contrib/emacs/password-store.el b/contrib/emacs/password-store.el
index 4733ddc..e02d4d7 100644
--- a/contrib/emacs/password-store.el
+++ b/contrib/emacs/password-store.el
@@ -31,6 +31,7 @@
;;; Code:
+(require 'dash)
(require 'f)
(require 's)
@@ -47,14 +48,14 @@
(defun password-store--run (&rest args)
"Run pass with ARGS.
-Returns the output on success, or outputs error message on
-failure."
+Nil arguments are ignored. Returns the output on success, or
+outputs error message on failure."
(with-temp-buffer
(let ((exit-code
(apply 'call-process
(append
(list password-store-executable nil (current-buffer) nil)
- args))))
+ (-reject 'null args)))))
(if (zerop exit-code)
(buffer-string)
(error (s-chomp (buffer-string)))))))