From b1243873d3d84837b0b71676b4070801f44789aa Mon Sep 17 00:00:00 2001 From: Rami Chowdhury Date: Sat, 5 Oct 2024 16:27:06 -0400 Subject: [PATCH] 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. --- conda.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conda.el b/conda.el index 1df7255..5a13c61 100644 --- a/conda.el +++ b/conda.el @@ -165,7 +165,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)