A question about run_onchage_
scripts
#4555
-
Consider I create a script in
As you can see, if chezmoi is run when the As far as I can get it, this feature is not reflected in the documentation (correct me if I'm wrong), but it's quite logical: if a contents of a script is completely empty, the script is apparently not being run, but also chezmoi does not remember its "empty" state and it is not counted as a "change" in script's contents (because there is, well, no contents of the script when that environment variable is set). This is an amazing thing, a method to "turn off" a script on demand while not altering chezmoi's "onchange" state. I'm interested, is this an "official" way of how chezmoi works and can I rely on such behaviour while building my configuration? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You could try modifying the script to do nothing when |
Beta Was this translation helpful? Give feedback.
-
Yes, you can rely on this. |
Beta Was this translation helpful? Give feedback.
Yes, you can rely on this.