Hi,
On Wed, 18 Apr 2018, anonymous8490532450 wrote:
> Per documentation, I am supposed to run post-install.bat for portable Git
> after extracting the 7z self-extracting archive file
> (PortableGit-2.16.2-64-bit.7z.exe in my case) manually, which I have.
>
> Running post-install.bat as advised (from cmd.exe with the extracted
> contents in the current directory) prints what looks like an error:
>
> /etc/post-install/
13-copy-dlls.post: line 2: git: command not found
>
> Looking around line 2 in the mentioned sourced script file (the .post file)
> I see the following:
>
> exec_path="$(git --exec-path)" ||
> return
>
> This tells me that an attempt is made to figure out a path by running Git.
> Which makes me wonder -- is Git supposed to be in the path already when the
> command is run?
Yes, absolutely. If it is not, it looks like a bug to me.
And looking at post-install.bat, I see that indeed PATH is extended to
/usr/bin/, but not to /mingw64/bin (or /mingw32/bin) where git.exe lives.
> Running post-install.bat is supposed to be what you do after extraction,
> and I haven't put Git in my PATH yet. Is the above expecting to succeed,
> or is it speculative and hence the "|| return" part?
>
> Is the error significant to the installation or can it be ignored?
It is significant.
If you could try to change the `export PATH=/usr/bin/:$PATH` to `export
PATH=/mingw32/bin:/mingw64/bin:/usr/bin/$PATH` and try again, that would
be very good.
And it it works, would you mind opening a PR that changes
https://github.com/git-for-windows/build-extra/blob/master/post-install.bat
accordingly?
Thanks,
Johannes