fix(utils): resolve binaries installed in the same venv/uv-tool bin#6
Merged
SonoTommy merged 1 commit intoJun 2, 2026
OpenOSINT:mainOpenOSINT/OpenOSINT:mainfrom
consocio:fix/venv-bin-tool-discoveryconsocio/OpenOSINT:fix/venv-bin-tool-discoveryCopy head branch name to clipboard
Merged
fix(utils): resolve binaries installed in the same venv/uv-tool bin#6SonoTommy merged 1 commit intoOpenOSINT:mainOpenOSINT/OpenOSINT:mainfrom consocio:fix/venv-bin-tool-discoveryconsocio/OpenOSINT:fix/venv-bin-tool-discoveryCopy head branch name to clipboard
SonoTommy merged 1 commit into
OpenOSINT:mainOpenOSINT/OpenOSINT:mainfrom
consocio:fix/venv-bin-tool-discoveryconsocio/OpenOSINT:fix/venv-bin-tool-discoveryCopy head branch name to clipboard
Conversation
shutil.which() only searches the system PATH, so tools like holehe or phoneinfoga installed inside the same virtual environment (e.g. via `uv tool install`) were never found, causing a spurious ToolNotFoundError. The fix prepends the directory of the running Python executable to the search path before calling shutil.which(), so co-installed binaries are always resolved regardless of the user's PATH. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SonoTommy
added a commit
that referenced
this pull request
Jun 2, 2026
…(thanks @consocio) Prepends the directory of sys.executable to the shutil.which search path in run_subprocess() so tools co-installed in the same venv (holehe, sherlock, phoneinfoga, sublist3r) are found even when the venv bin is not on PATH. Also fixes 12 test monkeypatches that were silently broken by the new path= kwarg, and adds two unit tests covering the new resolution logic.
Member
|
@consocio Merged, thank you. Clean fix — and reviewing it surfaced a latent bug in our own test mocks, so this helped more than the three lines suggest. The merge ended up attributing the commit to me rather than you, which wasn't intended — full credit is yours, and I've made sure you're credited in the CHANGELOG, the README contributors section, and the release notes. Affects everyone installing via uv. Appreciate it. |
SonoTommy
added a commit
that referenced
this pull request
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When OpenOSINT is installed via
uv tool install, it runs inside an isolated virtual environment. Tools likeholeheorphoneinfogacan be installed into that same environment (e.g.uv pip install holehe --python <venv-python>), butshutil.which()only searches the systemPATH— not the venv'sbin/directory. This causes a spuriousToolNotFoundErroreven when the binary is present and working.Symptom:
Fix
Prepend the directory of the running Python executable (
sys.executable) to the search path before callingshutil.which(). This ensures any binary co-installed in the same venv or uv-tool environment is always resolved, regardless of the user's systemPATH.Impact
PATH.uv tool install).run_subprocess()(holehe,phoneinfoga,sherlock,sublist3r, etc.).🤖 Generated with Claude Code