Whether the `atomic-grok` package has installed hooks globally.
()
| 115 | |
| 116 | /// Whether the `atomic-grok` package has installed hooks globally. |
| 117 | fn is_hooks_installed() -> bool { |
| 118 | Self::global_hooks_path() |
| 119 | .map(|path| { |
| 120 | std::fs::read_to_string(path) |
| 121 | .map(|content| content.contains(ATOMIC_HOOK_PREFIX)) |
| 122 | .unwrap_or(false) |
| 123 | }) |
| 124 | .unwrap_or(false) |
| 125 | } |
| 126 | |
| 127 | fn extract_session_id(session_id: Option<String>) -> String { |
| 128 | session_id |