Closed goto1134 closed 1 year ago
IMHO this feels like a limitation of the dotfile manager. It should have an option to allow for transient or wildcard fields.
The last_udpate field is necessary for best functioning of Scoop - and the ~/.config/scoop/config.json is the only file (outside of Scoop home) that Scoop manages - so it can't be stored anywhere else.
For anyone who will find this issue here is my bulky solution for the problem using templates:
{
{{- $configFile := joinPath .chezmoi.homeDir ".config/scoop/config.json" }}
{{- if stat $configFile }}
{{- $configJson := include $configFile | fromJson }}
{{- if $configJson }}
{{- if index $configJson "last_update" }}
{{- $last_update := $configJson.last_update }}
{{- if $last_update }}
"last_update": {{ $last_update | quote }},
{{- end }}
{{- end }}
{{- end }}
{{- end }}
"aria2-enabled": true,
"aria2-warning-enabled": false,
"debug": false,
"scoop_branch": "master",
"scoop_repo": "https://github.com/ScoopInstaller/Scoop"
}
Feature Request
Is your feature request related to a problem? Please describe.
I am using dotfiles to sync configuration across machines. There is a repository that contains all my configs managed by chezmoi, and I have a scoop
config.json
template there too.Every time I check for any changes in configuration, scoop's
config.json
is different from the committed version. The only difference is thelast_update
field.Describe the solution you'd like
last_update
field is excluded fromconfig.json
and stored somewhere else.