Skip to content

Commit

Permalink
Merge pull request #434 from Fuco1/feature/local-executable-files
Browse files Browse the repository at this point in the history
Add package executable files to exec-path
  • Loading branch information
Fuco1 committed Aug 31, 2018
2 parents 553c741 + 6334261 commit 1c59a84
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions cask.el
Expand Up @@ -712,6 +712,7 @@ If BUNDLE is not a package, the error `cask-not-a-package' is signaled."
"Return Emacs `exec-path' (including BUNDLE dependencies)."
(cask--with-environment bundle
(append
(-map 'expand-file-name (-uniq (-map 'f-parent (-filter 'f-executable-p (cask-files bundle)))))
(-select
'f-dir?
(-map
Expand Down
10 changes: 10 additions & 0 deletions test/cask-api-test.el
Expand Up @@ -442,6 +442,16 @@
(let ((path (f-join (cask-elpa-path bundle) "package-e-0.0.1" "bin")))
(should (equal (cons path exec-path) (cask-exec-path bundle))))))

(ert-deftest cask-exec-path-test/local-executable-files ()
(cask-test/with-bundle
'((source localhost)
(files "bin/executable"))
(f-mkdir "bin")
(f-touch "bin/executable")
(chmod "bin/executable" 755)
(let ((path (f-join (cask-path bundle) "bin/")))
(should (equal (cons path exec-path) (cask-exec-path bundle))))))


;;;; cask-load-path

Expand Down

0 comments on commit 1c59a84

Please sign in to comment.