Subprocess on macOS uses the system path and not the user CLI environment path. So, Apple's own Git version at /usr/bin will be preferred to a user installed version unless the path is made explicit. Most people use a CLI package manager such as 'Homebrew' to install and manage their own binary versions - eg git citool To access any user installed binaries, the full path must be enumerated i.e /opt/homebrew/bin/git
This solution works for me using Homebrew installed binaries, MacPorts installs elsewhere and I have not extended this. Note, there is no error checking here for path validity.
Subprocess on macOS uses the system path and not the user CLI environment path. So, Apple's own Git version at
/usr/bin
will be preferred to a user installed version unless the path is made explicit. Most people use a CLI package manager such as 'Homebrew' to install and manage their own binary versions - eggit citool
To access any user installed binaries, the full path must be enumerated i.e/opt/homebrew/bin/git
This solution works for me using Homebrew installed binaries, MacPorts installs elsewhere and I have not extended this. Note, there is no error checking here for path validity.