ocaml / opam

opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.
https://opam.ocaml.org
Other
1.21k stars 348 forks source link

Extend the GNU patch warning to cover PATH-shadowing #6052

Open dra27 opened 1 week ago

dra27 commented 1 week ago

As reported on Discuss, when opam checks for GNU patch, it only checks the first resolution in PATH, which is potentially confusing if the user believes they have installed GNU patch.

The warning can be easily extended, in a similar vein to the Git-for-Windows checks in opam init: resolve patch in each directory in PATH and display a different message if GNU patch is found in a shadowed location suggesting that PATH needs to be adjusted.