pub fn check_gh_cli_version_str(
    min_required: Version,
    version_str: &str
) -> Result<(), Box<dyn Error>>
Expand description

Check that the GitHub CLI version meets version requirements from the string output of gh --version

§Example

let version_str = "gh version 2.43.1 (2024-01-31)";
let min_required = semver::Version::new(2, 43, 1);
let version = check_gh_cli_version_str(min_required, version_str);
assert!(version.is_ok());

§Errors

Returns an error if the version string cannot be parsed as a semver version or if the version is less than the minimum required version.