From 01af39e0db27c79e9f25e255ac6c75c8544e889b Mon Sep 17 00:00:00 2001 From: Svend Sorensen Date: Sat, 26 Apr 2014 14:31:51 -0700 Subject: Remove nils from run argument list --- contrib/emacs/Cask | 1 + contrib/emacs/password-store.el | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'contrib/emacs') 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))))))) -- cgit v1.2.3