Using environment variable in onepasswordRead
chessbyte opened this issue · comments
What exactly are you trying to do?
In a template, trying to specify 1password account from an environment variable.
What have you tried so far?
This works
{{ onepasswordRead "op://chessbyte/GitHub/access-token" "1234567890ABCDEF1234567890" }}
but this doesn't
{{ onepasswordRead "op://chessbyte/GitHub/access-token" "$OP_ACCOUNT" }}
nor does this
{{ onepasswordRead "op://chessbyte/GitHub/access-token" "{{ env "OP_ACCOUNT" }}" }}
Where else have you checked for solutions?
- I have read chezmoi's user guide, and not found the answer.
- I have searched chezmoi's reference guide, and not found the answer.
- Other, please give details.
Output of any commands you've tried with --verbose
flag
Output of chezmoi doctor
Additional context
You want this:
{{ onepasswordRead "op://chessbyte/GitHub/access-token" (env "OP_ACCOUNT") }}
Hopefully this is now resolved. Please re-open if needed.