fix: fail on unknown x.py commands - #833
Conversation
Signed-off-by: Ehtasham-Yasin <ehtasham.yasin.dev@gmail.com>
|
CI investigation: the three failing WebAssembly jobs reproduce on the current |
|
Additional CI investigation: the Windows amd64/arm64 failures are existing test portability issues, not caused by this PR. Both jobs fail assertions that expect POSIX paths such as |
Summary
Make
x.pyreturn a failure status for unsupported commands while preserving its existing diagnostic output.Motivation
Fixes #823. Invalid commands currently print an error but exit successfully, which makes scripts treat failed invocations as successful.
Target and compatibility impact
Only invalid CLI command dispatch changes: unsupported commands now exit with status 1. Supported commands, help/usage output, and target selection are unchanged.
Validation
python3 -m unittest tools.test_xpython3 -m py_compile x.py tools/test_x.pygit diff --checkChecklist
Signed-off-byline.std/license boundary.