diff options
author | Patrick Steinhardt <ps@pks.im> | 2025-02-26 09:22:18 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-02-26 09:09:36 -0800 |
commit | 454d79b61be88831c1b899a1268f7b3d6cc577d2 (patch) | |
tree | 9fea47a62c345dd4a26df8784771731f588d5648 /diff.c | |
parent | eee25bbd84e2c3c00ea75080133374c48eeb3240 (diff) |
meson: improve PATH handling
When locating programs required for the build we give some special
treatment to Windows systems so that we know to also look up tools
provided by a Git for Windows installation. This ensures that the build
doesn't have any prerequisites other than Microsoft Visual Studio, Meson
and Git for Windows.
Consequently, some of the programs returned by `find_program()` may not
be found via PATH, but via these extra directories. But while Meson can
use these tools directly without any special treatment, any scripts that
we execute may not be able to find those programs. To help them we thus
prepend the directories of a subset of the found programs to PATH.
This doesn't make much sense though: we don't need to prepend PATH for
any program that was found via PATH, but we really only need to do so
for programs located via the extraneous Windows-specific paths. So
instead of prepending all programs paths, we really only need to prepend
the Windows-specific paths.
Adapt the code accordingly by only prepeding Windows-specific paths to
PATH, which both simplifies the code and clarifies intent.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
0 files changed, 0 insertions, 0 deletions