From 4788cf7e3c4350550f2fdc6c03bcbdd4c833f07d 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 2d864c6..238a8e5 100644 --- a/conda.el +++ b/conda.el @@ -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)