Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/specify_cli/events/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,10 @@ def _run_inline(command_name, payload, project_root, timeout, envelope="plain",
return result.returncode
return 0
except subprocess.TimeoutExpired:
print(f"Event {command_name} timed out", file=sys.stderr)
logger.error("Event %s timed out", command_name)
return 2
except Exception as e:
print(f"Event {command_name} error: {e}", file=sys.stderr)
logger.error("Event %s error: %s", command_name, e)
Comment thread
Quratulain-bilal marked this conversation as resolved.
return 2


Expand Down Expand Up @@ -1371,9 +1371,8 @@ def install_integration_events(
if ev in canonical_to_native:
filtered[ev] = handlers
else:
print(
f"\u26a0\ufe0f {integration.key} does not support '{ev}' events; skipping",
file=sys.stderr,
logger.warning(
"%s does not support '%s' events; skipping", integration.key, ev,
)

# #3: an empty resolved map (--events false, or override disabling events)
Expand Down
4 changes: 2 additions & 2 deletions tests/integrations/test_integration_vibe.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,14 @@ def test_wildcard_matcher_omitted(self, tmp_path):
(hook,) = self._parse(tmp_path)["hooks"]
assert "match" not in hook

def test_unsupported_events_are_skipped(self, tmp_path, capsys):
def test_unsupported_events_are_skipped(self, tmp_path, caplog):
self._install(tmp_path, {
"session_start": [{"command": "speckit.agent-context.update"}],
"pre_tool_use": [{"command": "speckit.tdd.validate"}],
})
hooks = self._parse(tmp_path)["hooks"]
assert [h["type"] for h in hooks] == ["pre_tool"]
assert "does not support 'session_start'" in capsys.readouterr().err
assert "does not support 'session_start'" in caplog.text

def test_multiple_handlers_get_unique_names(self, tmp_path):
"""Vibe drops duplicate hook names, so shared command stems must not collide."""
Expand Down