Skip to content

failure using git built from source #604

@kcburge

Description

@kcburge

If git was built from source, the version appears as:

git version 2.39.GIT

This regex fails, producing a nil version:

version = output[/\d+\.\d+(\.\d+)+/]

Fix:
version = output[/\d+.\d+(.(?:GIT|\d+))+/]

This at least prevents it from failing with this error:

../.local/share/gem/ruby/3.0.0/gems/git-1.13.0/lib/git/lib.rb:1034:in current_command_version': undefined method split' for nil:NilClass (NoMethodError)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions