gix_path::env

Function system_prefix

Source
pub fn system_prefix() -> Option<&'static Path>
Expand description

Returns the platform dependent system prefix or None if it cannot be found (right now only on windows).

§Performance

On windows, the slowest part is the launch of the Git executable in the PATH, which only happens when launched from outside of the msys2 shell.

§When None is returned

This happens only windows if the git binary can’t be found at all for obtaining its executable path, or if the git binary wasn’t built with a well-known directory structure or environment.