Open sanchitram1 opened 1 year ago
Hopefully we don't need post-install scripts, but realistically we will eventually (think setting up servers). The general solution, if provided, would be use environment variables via runtime.env.FOO: {{prefix}}/etc/whatever
if zsh provides them.
You can use ZDOTDIR
to configure zsh to look in a different directory instead of HOME
. But, it's blank by default, since .zshrc
is in HOME
.
What about find ~ -name .zshrc -print -quit
to find and print the first result? Since it's looking in ~
, it should find HOME first?
I mean, you can find a .zshrc, if one exists, on the build machine. I guess if you were just an awful person, this might work:
runtime:
env:
_FOO: $(echo "source {{prefix}}/etc/zsh_completion.zsh" >> ${ZDOTDIR:=~}/.zshrc)
but a) I think that violates the spirit of tea
, and b) we'd probably want to reject it.
I encountered this issue while packaging zsh-syntax-highlighting (#2000) that requires something to be added to
$HOME/.zshrc.
Should we create a way to modify a user's system post-install? Certain packages definitely require it.Context: Here's what I see for
$HOME
.We could use something like
{{home}}
to refer to the user's home directory.