@@ -86,16 +86,20 @@ def main() -> int:
8686 png_paths = _resolve_explicit_files (args .files )
8787 mode_label = f"{ len (png_paths )} explicit file(s)"
8888 else :
89- # Check CHANGED_FILES env var (set by GitHub Actions)
90- env_files = os .environ .get ("CHANGED_FILES" , "" ).strip ()
91- if env_files and not args .force_all :
92- file_list = env_files .splitlines () if "\n " in env_files else env_files .split ()
93- png_paths = _resolve_explicit_files ([f .strip () for f in file_list if f .strip ()])
89+ # Check CHANGED_FILES env var (set by GitHub Actions).
90+ # Use `get` with sentinel to distinguish "not set" from "set but empty":
91+ # None → local dev, fall back to mtime-based discovery
92+ # "" → CI run where no raw files changed; process nothing
93+ # "..." → CI run with specific changed files
94+ env_value = os .environ .get ("CHANGED_FILES" ) # None if var is absent
95+ if env_value is not None and not args .force_all :
96+ file_list = [f .strip () for f in env_value .splitlines () if f .strip ()]
97+ png_paths = _resolve_explicit_files (file_list )
9498 mode_label = f"{ len (png_paths )} file(s) from CHANGED_FILES"
9599 else :
96- # Auto-discover: changed only (default) or all ( --all flag )
100+ # Local dev: mtime-based discovery ( or --all to skip mtime check )
97101 png_paths = discover_unprocessed_frames (FRAMES_INPUT , FRAMES_OUTPUT , force = args .force_all )
98- mode_label = "all frames" if args .force_all else "changed frames"
102+ mode_label = "all frames" if args .force_all else "changed frames (mtime) "
99103
100104 logger .info (f"Mode: { mode_label } " )
101105
0 commit comments