Arggg

Xargs executes somewhere else...
 Your were right. 
./ls.exe  instead of ls worked fine...

Immo

-----Original Message-----
From: Konstantin Khomoutov [mailto:flatw...@users.sourceforge.net] 
Sent: Donnerstag, 29. November 2012 13:39
To: git-users@googlegroups.com
Cc: IMMO WETZEL
Subject: Re: [git-users] xargs on windows doesnt work

On Thu, 29 Nov 2012 01:30:39 -0800 (PST) immo <immo.wet...@adtran.com> wrote:

> I was trying to write a git hook with the build in “unix” commands 
> from git.
> 
> But xargs doesn’t work as expected
> > git version 1.8.0.msysgit.0 (C:\Program Files (x86)\Git\bin)
> 
> C:\Program Files (x86)\Git\bin>echo -la | xargs ls
> xargs: ls: No such file or directory
>  
> What can I do to solve this ? 

xargs seemingly fails to locate the "ls" program.
In my Git install, it's present under the %ProgramFiles%\Git\bin.
Supposedly this directory is not on the %PATH% when your hook runs and so the 
ls binary is not found.
You could verify this by putting something like set >%TEMP%\env.txt in your 
hook, making it run and then inspecting the generated file.

As to fixing the problem -- I don't know.  I would rather first identify the 
true symptoms as described above and then would work from there.

-- 


Reply via email to