From ab6e0b3103eb2f9986520eeef39625ac3ecb1968 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 19 Sep 2024 00:20:36 +0100 Subject: Overriding shell command name and switch only on unix systems Should address issue #48 --- geiser-guile.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/geiser-guile.el b/geiser-guile.el index 1ab658f..75142c3 100644 --- a/geiser-guile.el +++ b/geiser-guile.el @@ -603,8 +603,9 @@ This function uses `geiser-guile-init-file' if it exists." (defun geiser-guile--version (_binary) "Find Guile's version running the configured Guile binary." ;; maybe one day we'll have `process-lines' with tramp support - (let ((shell-command-switch "-c") - (shell-file-name "sh")) + (let* ((unixy (not (member system-type '(windows-nt ms-dos cygwin)))) + (shell-command-switch (if unixy "-c" shell-command-switch)) + (shell-file-name (if unixy "sh" shell-file-name))) (shell-command-to-string (format "%s -c %s 2>/dev/null" (geiser-guile--binary) -- cgit v1.2.3