Skip to content

resolveConfigPath bugs #13

@cspotcode

Description

@cspotcode

When calling parse('./directory'), the string is supposed to be interpreted as cwd.
https://github.com/jonschlinkert/parse-git-config/blob/master/index.js#L36

Yet that value is passed to resolveConfigPath('./directory') which treats it as the type instead of cwd.
https://github.com/jonschlinkert/parse-git-config/blob/master/index.js#L58
https://github.com/jonschlinkert/parse-git-config/blob/master/index.js#L89
https://github.com/jonschlinkert/parse-git-config/blob/master/index.js#L108

Additionally, this call to configPath passes the type but omits cwd. So when you call resolveConfigPath({cwd, type}) -- or pass the same options object to parse -- it will not do the right thing.
https://github.com/jonschlinkert/parse-git-config/blob/master/index.js#L110

Activity

changed the title [-]resolveConfigPath bug: API does not match parse()[/-] [+]resolveConfigPath bugs[/+] on Aug 2, 2019
linked a pull request that will close this issue on May 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @cspotcode@jonschlinkert

      Issue actions

        resolveConfigPath bugs · Issue #13 · jonschlinkert/parse-git-config