help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Program working with shell-command but not call-process


From: John Mastro
Subject: Program working with shell-command but not call-process
Date: Thu, 3 Jul 2014 09:46:43 -0700

Does anyone know what situation would result in this working:

    (shell-command-to-string "git --version")
    ;=> it returns "git version 2.0.1"

But not this:

    (with-output-to-string
      (call-process "git" nil standard-output nil "--version"))
      ;=> it returns ""
      ;=> `call-process' alone returns 53

This git is built and installed from source on Cygwin. It works fine
from the shell but not via `call-process', which means it doesn't work
with `magit'.

It's in my path (both $PATH and `exec-path'), and `executable-find'
finds it without problem at c:/usr/local/bin/git.exe.

The git that's availablefor install via Cygwin (quite old, v1.7.9),
succeeds with both the calls above. It's still installed at
c:/bin/git.exe.

Thanks,

John


reply via email to

[Prev in Thread] Current Thread [Next in Thread]