Skip to content

bug: search command --ldap-uri CLI flag is broken #1

Description

@timoguin

It seems that both the --ldap-uri CLI flag and the GOLDAP_LDAP_URI environment variable config sources are broken. Setting ldap-uri via config file works, but it ignores the other (higher-precedence) config sources.

The order of precedence should go like this:

  • CLI flags -H / --ldap-uri
  • Environment variable GOLDAP_LDAP_URI
  • Config file ldap-uri

Output when specifying --ldap-uri:

$ goldap search --ldap-uri ldap://server.example.com
{"level":"debug","msg":"test in search command"}
{"level":"fatal","msg":"Failed to dial URI","uri":"","err":"LDAP Result Code 200 \"Network Error\": Unknown scheme ''"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions