Skip to content

Commit

Permalink
WIP - Use platform-appropriate binary name
Browse files Browse the repository at this point in the history
  • Loading branch information
robertknight committed Feb 28, 2024
1 parent 5d76736 commit 78cda77
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/test-e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ def build_ocrs() -> None:

def extract_text(image_path: str) -> str:
"""Extract text from an image using ocrs."""
if sys.platform == "win32":
bin_name = "ocrs.exe"
else:
bin_name = "ocrs"
result = run(
# We run the binary directly here rather than use `cargo run` as it
# is slightly faster.
f'target/release/ocrs "{image_path}"',
f'target/release/{bin_name} "{image_path}"',
shell=True,
check=True,
text=True,
Expand Down

0 comments on commit 78cda77

Please sign in to comment.