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
4 changes: 2 additions & 2 deletions factory/obsidian/notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def _obsidian_create(name: str, content: str, vault: str = "factory") -> bool:
try:
result = subprocess.run(
[
"obsidian",
"obsidian-cli",
"create",
f"vault={vault}",
f"name={name}",
Expand All @@ -165,7 +165,7 @@ def _obsidian_search(query: str, vault: str = "factory", limit: int = 10) -> str
try:
result = subprocess.run(
[
"obsidian",
"obsidian-cli",
"search",
f"vault={vault}",
f"query={query}",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_obsidian.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def test_write_experiment_tries_cli_first(
original_run = subprocess.run

def mock_run(*args, **kwargs):
if args and args[0] and args[0][0] == "obsidian":
if args and args[0] and args[0][0] == "obsidian-cli":
calls.append(args[0])
return Mock(returncode=1) # CLI fails
return original_run(*args, **kwargs)
Expand All @@ -298,7 +298,7 @@ def mock_run(*args, **kwargs):
monkeypatch.setattr("factory.obsidian.notes._obsidian_create", _real_obsidian_create)
path = write_experiment_note("test-project", sample_record)
# Should have tried CLI
assert any("obsidian" in str(c) for c in calls)
assert any("obsidian-cli" in str(c) for c in calls)
# Should have fallen back to file write
assert path.exists()

Expand Down
Loading