Aling33 e830c85adf
fix(scripts): reject a directory passed to support_bundle --out (#7256)
* fix(scripts): reject a directory passed to support_bundle --out

`--out` names the zip, but the path went straight to `zipfile.ZipFile`, so
pointing it at an existing directory ended in a raw `PermissionError` traceback
(Windows) instead of the CLI's usual `error: ...` + exit 2.

`create_support_bundle` now raises the `ValueError` the CLI already maps to a
clean message, and the regression test pins exit 2 with no traceback.

* docs(scripts): say "zip file path" for support_bundle --out

Review nit: the help text said only "Output zip path", so the
file-not-directory contract the new validation enforces was invisible until a
run failed.

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-10-22 18:26:55 +08:00
..