Skip to content

Commit 369c408

Browse files
committed
code: Fix exec
1 parent a21f875 commit 369c408

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

lisp/_prepare.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ Eask file in the workspace."
304304
"Set files patterns."
305305
(setq eask-files patterns))
306306

307-
(defun eask-depends-on (pkg &optional minimum-version)
307+
(defun eask-depends-on (pkg &optional minimum-version &rest rcp)
308308
"Specify a dependency of this package."
309309
(if (string= pkg "emacs")
310310
(when (and minimum-version (version< emacs-version minimum-version))

lisp/exec.el

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,15 @@
2020

2121
(eask-start
2222
(eask-pkg-init)
23+
2324
(setq commander-args (cddr argv)) ; by pass `--' as well
24-
(if-let* ((command (eask-argv 1))
25-
(exe (executable-find command)))
26-
(load-file exe)
27-
(error "Executable `%s`.. not found" command)))
25+
(let* ((program (eask-argv 1))
26+
(exe (executable-find program))
27+
(command (mapconcat #'identity (append (list program) commander-args) " ")))
28+
(unless (or (ignore-errors (load exe t t))
29+
(progn
30+
(message "Execute command %s..." command)
31+
(zerop (shell-command command))))
32+
(error "Error from execution."))))
2833

2934
;;; exec.el ends here

0 commit comments

Comments
 (0)