Skip to content

Allow colons in $PATH environment variables #17

@camh-

Description

@camh-

Importer.AppendSearchFromEnv() splits the value of an environment variable using os.SplitList which uses os.ListSeparator as the separator rune. This makes it impossible to have that rune as a character in a path element. On Unix-like OSes, ListSeparator is a colon which prevents having a netpath element with a port number, or an IPv6 address.

Rather than using SplitList, do the split ourselves and allow the ListSeparator to be escaped with a backslash.

We'll still keep netpaths (double-slash for https) so you don't always have to escape the colon in the URL you would otherwise have to, but at least this will now allow ports.

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