Skip to content

Commit b124387

Browse files
committed
fix: Ignore stderr when getting version
Simplify `conda--get-version` to a) stop using a shell, and b) discard stderr, so we don't try to parse any diagnostic messages as a version.
1 parent 99fdda0 commit b124387

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

conda.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ Set for the lifetime of the process.")
165165
Cached for the lifetime of the process."
166166
(if (not (eq conda--installed-version nil))
167167
conda--installed-version
168-
(let ((version-output (shell-command-to-string (format "\"%s\" -V" (conda--get-executable-path)))))
168+
(let ((version-output (with-temp-buffer
169+
(call-process (conda--get-executable-path) nil '(t nil) nil "-V")
170+
(buffer-string))))
169171
(condition-case err
170172
(s-with version-output
171173
(s-trim)

0 commit comments

Comments
 (0)