mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-14 18:01:20 +08:00
43de93a39c
Every `snapshot` run unconditionally deleted existing .png/.jpg files in the output directory before capturing new ones, so two consecutive runs with different --at sets clobbered each other with no way to opt out. Extracted the wipe into cleanSnapshotDir(), matching the existing computeSnapshotTimes/tailFrameTime extraction pattern in this file so it's unit-testable directly, and gated it behind a new --clean flag (default true, preserving current behavior) following the same default-true/ --no-x-to-opt-out convention already established by --end/--no-end.