Skip to content

Commit

Permalink
fix import path
Browse files Browse the repository at this point in the history
  • Loading branch information
mhils committed Jan 2, 2025
1 parent 80dcfa6 commit ebb069d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mitmproxy-linux/mitmproxy_linux/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys
import sysconfig
from pathlib import Path


Expand All @@ -15,7 +16,8 @@ def executable_path() -> Path:
return Path(pyinstaller_dir) / "mitmproxy-linux-redirector"
else:
here = Path(__file__).parent.absolute()
exe = here / "mitmproxy-linux-redirector"
scripts = Path(sysconfig.get_path("scripts")).absolute()
exe = scripts / "mitmproxy-linux-redirector"

# Development path: This should never happen with precompiled wheels.
if not exe.exists() and (here / "../Cargo.toml").exists():
Expand Down

0 comments on commit ebb069d

Please sign in to comment.