Skip to content

Commit

Permalink
fix: Ignore stderr when getting version
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
necaris committed Oct 5, 2024
1 parent ce748a5 commit 4788cf7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion conda.el
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ Set for the lifetime of the process.")
Cached for the lifetime of the process."
(if (not (eq conda--installed-version nil))
conda--installed-version
(let ((version-output (shell-command-to-string (format "\"%s\" -V" (conda--get-executable-path)))))
(let ((version-output (with-temp-buffer
(call-process (conda--get-executable-path) nil '(t nil) nil "-V")
(buffer-string))))
(condition-case err
(s-with version-output
(s-trim)
Expand Down

0 comments on commit 4788cf7

Please sign in to comment.