How to handle external .env files with chezmoi #3062
|
Good evening 👋🏼 , I've been migrating to chezmoi these last couple of days, it's challenging but also very cool to figure everything out! This is how it's defined in .chezmoiexternal.toml: ["DEV/GO/somerepo"]
type = "git-repo"
url = "git@github.com:dude/soomerepo.git"
refreshPeriod = "33h"
["DEV/GO/somerepo".pull]
args = ["--ff-only"]Now this repository has a For example with a But whenever I try to The question I have is, how to properly do this with chezmoi.. And is this a common pattern which is supported by chezmoi? Or am I butchering this and should tackle it in a different manner? Thanks a lot for your time 🙏🏼 . |
Replies: 1 comment 2 replies
Essentially, Chezmoi expects an entry to either be managed as an external entry or a fully managed entry, not both. So The way to work around this—assuming that |
Essentially, Chezmoi expects an entry to either be managed as an external entry or a fully managed entry, not both. So
DEV/GO/somerepois managed as an external, but you have an entry file inside of it.The way to work around this—assuming that
.envis in the repo.gitignore—would be to have anafter_script that createsDEV/GO/somerepo/.env.