Closed sheeley closed 3 years ago
Agh. I need a linter or something. Capitalization issue, sorry.
Thanks for opening the issue! Yeah, this is a capitalization issue. chezmoi uses viper under the hood, which silently converts all variable names to lowercase (https://github.com/twpayne/chezmoi/issues/463).
Yeah, it took me ages to notice that. I'm wondering if it would make sense to have a treatment like git
does.
git: 'ram' is not a git command. See 'git --help'.
The most similar commands are
am
rm
Something like adding this error handling
if err != nil && strings.Contains(err.Error(), "map has no entry for key") {
key := getKeyFromErr(err) // - in this case, bartender2License
// do some levenshtein magic to get similar keys ^
fmt.Println(similarKeys)
panic(err)
}
Would you be interested in that functionality?
What exactly are you trying to do?
I'm trying to create a templated script that injects secrets before running. For some reason, it appears that chezmoi's normal
data
variables aren't available.What have you tried so far?
I've created a templated script (
licenses.sh.tmpl
- also tried withrun_once_
prefix) with this content:And I've run these commands:
Where else have you checked for solutions?
Output of any commands you've tried with
--verbose
Output of
chezmoi doctor
Additional context
Add any other context about the problem here.