Skip to content

fix(cli): improve bin dirs search#1638

Merged
JP-Ellis merged 1 commit into
mainfrom
fix/improve-bin-dirs-search
Jun 29, 2026
Merged

fix(cli): improve bin dirs search#1638
JP-Ellis merged 1 commit into
mainfrom
fix/improve-bin-dirs-search

Conversation

@JP-Ellis

Copy link
Copy Markdown
Member

📝 Summary

In addition to a relative search to __file__, search the platlib and purelib paths exposed by sysconfig.

🚨 Breaking Changes

🔥 Motivation

As discovered in #1623, the path resolution is not as rigorous as originally anticipated, with some situations (e.g., worktrees, or displaced venvs) resulting in Pact Python CLI being unable to discover the bundled binaries.

🔨 Test Plan

Unit test

🔗 Related issues/PRs

Fixes #1623

@JP-Ellis JP-Ellis self-assigned this Jun 29, 2026
@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74%. Comparing base (c67dbd5) to head (33b5541).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@         Coverage Diff          @@
##           main   #1638   +/-   ##
====================================
  Coverage    74%     74%           
====================================
  Files        36      36           
  Lines      4028    4042   +14     
====================================
+ Hits       2996    3010   +14     
  Misses     1032    1032           
Flag Coverage Δ
examples 37% <ø> (+<1%) ⬆️
tests 73% <100%> (+<1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

As discovered in #1623, the path resolution is not as rigorous as
originally anticipated, with some situations (e.g., worktrees, or
displaced venvs) resulting in Pact Python CLI being unable to discover
the bundled binaries.

Signed-off-by: JP-Ellis <josh@jpellis.me>
@JP-Ellis JP-Ellis force-pushed the fix/improve-bin-dirs-search branch from 487b6dd to 33b5541 Compare June 29, 2026 23:41
@JP-Ellis JP-Ellis merged commit 068debe into main Jun 29, 2026
41 checks passed
@JP-Ellis JP-Ellis deleted the fix/improve-bin-dirs-search branch June 29, 2026 23:45
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.

Unable to find pact-plugin-cli binary executable.

1 participant