Skip to content

Guard Keychain-dependent templates for CI#10

Merged
acjackman merged 4 commits intomainfrom
cyrus/aj-113-guard-keychain-dependent-templates-for-ci
Apr 18, 2026
Merged

Guard Keychain-dependent templates for CI#10
acjackman merged 4 commits intomainfrom
cyrus/aj-113-guard-keychain-dependent-templates-for-ci

Conversation

@cyrusagent
Copy link
Copy Markdown

@cyrusagent cyrusagent Bot commented Apr 14, 2026

Assignee: @acjackman (adam)

Summary

  • Wrapped security find-generic-password calls in both noti.yaml.tmpl and prefs.plist.tmpl with chezmoi's lookPath "security" guard
  • When security binary is absent (Linux/CI), templates fall back to TEST_TOKEN placeholder instead of running the command
  • No change to behavior on macOS where the security binary exists — real Keychain values are still used

Approach

Used chezmoi's built-in lookPath template function to check for the security binary at render time. This is simpler than adding a custom data variable and works automatically without CI config changes.

Verification

Tested on Linux with chezmoi execute-template:

  • noti.yaml renders as appurl: 'TEST_TOKEN'
  • prefs.plist renders with token=TEST_TOKEN in the Kagi search URL
  • Both produce valid config file syntax

Resolves AJ-113


Tip: I will respond to comments that @ mention @cyrusagent on this PR. You can also submit a review with all your feedback at once, and I will automatically wake up to address each comment.

eve-bot and others added 4 commits April 14, 2026 01:58
Wrap `security find-generic-password` calls with `lookPath "security"`
so templates render cleanly on Linux (CI) where no Keychain exists.
Falls back to `TEST_TOKEN` placeholder when the binary is absent.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Required by repo policy — actions must use full-length SHAs instead of
version tags.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The destination directory must exist before chezmoi can write into it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@acjackman acjackman merged commit 5c903ed into main Apr 18, 2026
3 checks passed
@acjackman acjackman deleted the cyrus/aj-113-guard-keychain-dependent-templates-for-ci branch April 18, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants