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

Allow colons in $PATH environment variables #17

Open
camh- opened this issue Jun 21, 2020 · 0 comments
Open

Allow colons in $PATH environment variables #17

camh- opened this issue Jun 21, 2020 · 0 comments

Comments

@camh-
Copy link
Member

camh- commented Jun 21, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant