File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,15 @@ you are debugging."
49
49
(defun dap-python--pyenv-executable-find (command )
50
50
" Find executable COMMAND, taking pyenv shims into account.
51
51
If the executable is a system executable and not in the same path
52
- as the pyenv version then also return nil. This works around
53
- https://github.com/pyenv/pyenv-which-ext."
54
- (if (executable-find " pyenv" )
52
+ as the pyenv version then also return nil. This works around
53
+ https://github.com/pyenv/pyenv-which-ext.
54
+
55
+ If pyenv is not installed or if pyenv has no \" local\" version defined
56
+ for the cwd, then fallback to `(executable-find)`, which see."
57
+ (if (and
58
+ (executable-find " pyenv" )
59
+ (not (string-match " no local" (shell-command-to-string " pyenv local" )))
60
+ )
55
61
(progn
56
62
(let ((pyenv-string (shell-command-to-string (concat " pyenv which " command)))
57
63
(pyenv-version-names (split-string (string-trim (shell-command-to-string " pyenv version-name" )) " :" ))
You can’t perform that action at this time.
0 commit comments