Skip to content

Conversation

@wdh
Copy link

@wdh wdh commented Apr 27, 2018

At present POSTGRES_HOME is ineffective if a Postgres is found in PATH. This makes POSTGRES_HOME take precedence so PATH can always be overridden.

@nohuhu
Copy link
Collaborator

nohuhu commented Apr 28, 2018

Looks good to me but this is somewhat significant behavior change so let's get other people chime in.

@TJC
Copy link
Owner

TJC commented May 2, 2018

The PR here does more than just make POSTGRES_HOME have higher precedence -- it also makes the various @base_paths take precedence over $PATH too. That might cause surprising behaviour.

I wonder if it would make sense to bring things together, by getting rid of File::Which, and setting up all the paths in _search_paths().

That way we can maintain current precedence rules, apart from moving POSTGRES_HOME to the front.

ie. _search_paths() would return something like:
[ @ENV_POSTGRES_HOME, @ENV_PATH, @base_paths ]

@SysPete
Copy link
Collaborator

SysPete commented May 2, 2018

File::Which was added as part of 5fe92a8 to make finding binaries more reliable on win32 so I'd suggest keeping that.

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

Successfully merging this pull request may close these issues.

4 participants