Skip to content

Commit 7b62d11

Browse files
authored
Merge pull request #564 from postgrespro/respect-path
Respect PATH in a pg_probackup binary check
2 parents b17669c + d7cc00b commit 7b62d11

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tests/helpers/ptrack_helpers.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,7 @@ def __init__(self, *args, **kwargs):
242242
self.user = self.get_username()
243243
self.probackup_path = None
244244
if 'PGPROBACKUPBIN' in self.test_env:
245-
if (
246-
os.path.isfile(self.test_env["PGPROBACKUPBIN"]) and
247-
os.access(self.test_env["PGPROBACKUPBIN"], os.X_OK)
248-
):
245+
if shutil.which(self.test_env["PGPROBACKUPBIN"]):
249246
self.probackup_path = self.test_env["PGPROBACKUPBIN"]
250247
else:
251248
if self.verbose:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy