Skip to content

redex.py: fix binary autodetection#982

Open
GunniBusch wants to merge 1 commit intofacebook:mainfrom
GunniBusch:fix-redex.py-bin-detection
Open

redex.py: fix binary autodetection#982
GunniBusch wants to merge 1 commit intofacebook:mainfrom
GunniBusch:fix-redex.py-bin-detection

Conversation

@GunniBusch
Copy link
Copy Markdown
Contributor

Summary

  • factor redex binary lookup into find_redex_binary() so validation and execution share the same autodetection path
  • allow validation to accept an autodetected redex-all from PATH or a bundled binary next to redex.py
  • add focused tests for autodetected and missing binary cases

Why

Validation previously rejected runs without --redex-binary even though runtime already supported autodetecting the binary.

Validation

  • python3 test/test_redex_args.py
  • python3 -m py_compile redex.py test/test_redex_args.py

@meta-cla meta-cla bot added the CLA Signed label Apr 2, 2026
@GunniBusch GunniBusch changed the title [codex] Fix redex binary autodetection validation redex.py: fix binary autodetection Apr 2, 2026
@GunniBusch GunniBusch marked this pull request as ready for review April 2, 2026 17:48
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Apr 16, 2026

@xuhdev has imported this pull request. If you are a Meta employee, you can view this in D101099802.

Comment thread redex.py
Comment thread test/test_redex_args.py Outdated
@GunniBusch GunniBusch force-pushed the fix-redex.py-bin-detection branch from 343ddfb to bd1dc91 Compare April 16, 2026 22:04
Signed-off-by: Leon Adomaitis <leon@adomaitis.de>
@GunniBusch GunniBusch force-pushed the fix-redex.py-bin-detection branch from bd1dc91 to f1d9211 Compare April 16, 2026 22:05
Comment thread redex.py
extract_signing_args(args)

if not args.unpack_only:
args.redex_binary = find_redex_binary(args.redex_binary)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of this line?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants