Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use defcustom for poetry command to allow users to specify its path #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions poetry.el
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@
"poetry.el now reads the repository list from Poetry settings. Please use `poetry config` to change the list of available repositories."
nil "0.2.0")

(defcustom poetry-command "poetry"
"The poetry command."
:type 'string)

;; Macros
;;;;;;;;;
Expand Down Expand Up @@ -691,10 +694,10 @@ compilation buffer name."
(unless (member command '(new init config))
(poetry-ensure-in-project))
(let* ((prog (or (cond ((eq system-type 'gnu/linux)
(concat "env -u VIRTUAL_ENV " (executable-find "poetry" t)))
(concat "env -u VIRTUAL_ENV " (executable-find poetry-command t)))
((or (eq system-type 'berkeley-unix)
(eq system-type 'darwin))
(executable-find "poetry" t)))
(executable-find poetry-command t)))
(poetry-error "Could not find 'poetry' executable")))
(args (if (or (string= command "run")
(string= command "config")
Expand Down