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

Do not assume that locate command is available #25

Closed
danielhollas opened this issue May 24, 2023 · 1 comment · Fixed by #26
Closed

Do not assume that locate command is available #25

danielhollas opened this issue May 24, 2023 · 1 comment · Fixed by #26

Comments

@danielhollas
Copy link
Contributor

When trying to find the pg_ctl binary, this package uses the locate command as a fallback when the command is not found in $PATH.

locate_cmd = ['locate', '-r', exact_file_regex]

However, locate command itself might not be available, for example in Docker containers. In this case, the package crashes with rather unhelpful stacktrace.

@ltalirz
Copy link
Collaborator

ltalirz commented May 26, 2023

That's a great point. A pull request that adds a clean try/except for the availability of locate would be much appreciated

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 a pull request may close this issue.

2 participants