Skip to content

Commit

Permalink
[Feature] Add brew PATH autodetection support for MacOS users
Browse files Browse the repository at this point in the history
  • Loading branch information
a-schaefers committed Mar 3, 2022
1 parent 570455f commit 0ba55e7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spartan-layers/spartan-environment.el
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@
;; "~/Put/To/End/Of/PATH"
))

;; Help out MacOS users to make dev env more like-linux
;; HINT: brew install coreutils findutils gnu-tar gnu-sed gawk gnutls gnu-indent gnu-getopt grep

(when (file-directory-p "/opt/homebrew")
(setq gnubin-locations
(split-string (shell-command-to-string "find /opt/homebrew -name \"*gnubin*\" -type d") "\n" t))
(add-to-list 'gnubin-locations "/opt/homebrew/bin" t)
(add-to-list 'gnubin-locations "/opt/homebrew/sbin" t)

(dolist (item gnubin-locations)
(add-to-list 'spartan-path-insert item)))

;; SET matching exec-path and 'PATH' values with inserts/appends

(dolist (item spartan-path-insert)
Expand Down

0 comments on commit 0ba55e7

Please sign in to comment.