Skip to content

Commit 2cc15af

Browse files
authored
Use inheritenv to find non-global spago (#33)
Currently, spago could only be detected if it was installed globally. This commit utilised inheritenv to allow spago to be found in the user's environment also. This is useful for when someone is developing with spago in an ephermeral shell, as provided by nix. Add inheritenv to package requires list Fix linebreak in package requires Bump emacs dependency to version 25.1
1 parent 8a7481b commit 2cc15af

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: psci.el

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
;; Author: Antoine R. Dumont <eniotna.t AT gmail.com>
66
;; Maintainer: Antoine R. Dumont <eniotna.t AT gmail.com>
77
;; Version: 0.0.6
8-
;; Package-Requires: ((emacs "24.4") (purescript-mode "13.10") (dash "2.9.0"))
8+
;; Package-Requires: ((emacs "25.1") (purescript-mode "13.10") (dash "2.9.0") (inheritenv "0.2"))
99
;; Keywords: languages purescript psci repl
1010
;; URL: https://github.com/purescript-emacs/emacs-psci
1111

@@ -51,6 +51,7 @@
5151
(require 'comint)
5252
(require 'dash)
5353
(require 'purescript-font-lock)
54+
(require 'inheritenv)
5455

5556
;; constants or variables
5657

@@ -122,9 +123,9 @@ When FILENAME is nil or not a real file, returns nil."
122123
"Find extra source path globs using purescript package tools,if they appear to be used."
123124
(cond
124125
((file-exists-p "psc-package.json")
125-
(process-lines (psci--executable-find-relative psci/psc-package-path) "sources"))
126+
(inheritenv (process-lines (psci--executable-find-relative psci/psc-package-path) "sources")))
126127
((or (file-exists-p "spago.dhall") (file-exists-p "spago.yaml"))
127-
(process-lines (psci--executable-find-relative psci/spago-path) "sources" "--quiet"))))
128+
(inheritenv (process-lines (psci--executable-find-relative psci/spago-path) "sources")))))
128129

129130
(defun psci--executable-find-relative (path)
130131
"If PATH is a relative path to an executable, return its full path.

0 commit comments

Comments
 (0)