Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli/named_args: better handle name conflicts in #to_paths #16069

Commits on Oct 1, 2023

  1. cli/named_args: better handle name conflicts in #to_paths

    Before we used to evaluate all named arguments as local paths
    first. This means that the following could be a name conflict.
    
    $ brew edit src
    
    If there was a local file or directory named src, it would default
    to that. Otherwise it would search for a formula/cask with the
    same name and return that.
    
    Now it will only default to the local path if the named argument
    starts or ends with a slash ('/') or includes a period ('.').
    This means that in the event of a name clash with a normal package
    name it will default to the package instead of the local file.
    
    It also fixes an edge case where the following would be interpreted
    as a tap name.
    
    $ brew edit /src
    apainintheneck committed Oct 1, 2023
    Configuration menu
    Copy the full SHA
    23b277b View commit details
    Browse the repository at this point in the history