Resolve strict mode: GRAPHIFY_HOOK_STRICT env overrides the baked-in flag (truthy forces on without a reinstall, falsy is the kill switch); unset defers to the flag the installed hook command carried.
(flag: bool)
| 1196 | |
| 1197 | |
| 1198 | def _hook_strict_enabled(flag: bool) -> bool: |
| 1199 | """Resolve strict mode: GRAPHIFY_HOOK_STRICT env overrides the baked-in flag |
| 1200 | (truthy forces on without a reinstall, falsy is the kill switch); unset defers |
| 1201 | to the flag the installed hook command carried.""" |
| 1202 | v = os.environ.get("GRAPHIFY_HOOK_STRICT", "").strip().lower() |
| 1203 | if v in ("1", "true", "yes", "on"): |
| 1204 | return True |
| 1205 | if v in ("0", "false", "no", "off"): |
| 1206 | return False |
| 1207 | return flag |
| 1208 | |
| 1209 | |
| 1210 | def _touch_query_stamp(graph_path: "Path") -> None: |