hash
stringlengths
40
40
date
stringdate
2019-01-29 11:49:07
2025-03-22 03:23:55
author
stringclasses
79 values
commit_message
stringlengths
14
85
is_merge
bool
1 class
git_diff
stringlengths
210
1.63M
type
stringclasses
8 values
masked_commit_message
stringlengths
8
79
d028004a863985321196e2f46390353703b24df9
2022-11-05 22:56:10
Tom Payne
chore: Better handle errors when globbing
false
diff --git a/go.mod b/go.mod index 5a0190f56ba..88df5829e71 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.17.1 github.com/aws/aws-sdk-go-v2/config v1.17.10 github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.16.4 - github.com/bmatcuk/doublestar/v4 v4.2.0 + github.com/bmatcuk/doublestar/v4 v4.3.1 github.com/bradenhilton/mozillainstallhash v1.0.0 github.com/charmbracelet/bubbles v0.14.0 github.com/charmbracelet/bubbletea v0.22.1 @@ -125,6 +125,4 @@ require ( gopkg.in/warnings.v0 v0.1.2 // indirect ) -exclude github.com/bmatcuk/doublestar/v4 v4.3.0 // https://github.com/bmatcuk/doublestar/issues/73 - exclude github.com/sergi/go-diff v1.2.0 // https://github.com/sergi/go-diff/issues/123 diff --git a/go.sum b/go.sum index 7dee3cea5ad..f4bead53aae 100644 --- a/go.sum +++ b/go.sum @@ -59,8 +59,8 @@ github.com/aymanbagabas/go-osc52 v1.2.1 h1:q2sWUyDcozPLcLabEMd+a+7Ea2DitxZVN9hTx github.com/aymanbagabas/go-osc52 v1.2.1/go.mod h1:zT8H+Rk4VSabYN90pWyugflM3ZhpTZNC7cASDfUCdT4= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= -github.com/bmatcuk/doublestar/v4 v4.2.0 h1:Qu+u9wR3Vd89LnlLMHvnZ5coJMWKQamqdz9/p5GNthA= -github.com/bmatcuk/doublestar/v4 v4.2.0/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= +github.com/bmatcuk/doublestar/v4 v4.3.1 h1:JmbSJX7X1c6ImkExYeRTcviuGnp3QFUK468GPrMlW9w= +github.com/bmatcuk/doublestar/v4 v4.3.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/bradenhilton/cityhash v1.0.0 h1:1QauDCwfxwIGwO2jBTJdEBqXgfCusAgQOSgdl4RsTMI= github.com/bradenhilton/cityhash v1.0.0/go.mod h1:Wmb8yW1egA9ulrsRX4mxfYx5zq4nBWOCZ+j63oK6uz8= github.com/bradenhilton/mozillainstallhash v1.0.0 h1:QL9byVGb4FrVOI7MubnME3uPNj5R78tqYQPlxuBmXMw= diff --git a/pkg/chezmoi/glob.go b/pkg/chezmoi/glob.go index 3e322d59774..d0dbd73498f 100644 --- a/pkg/chezmoi/glob.go +++ b/pkg/chezmoi/glob.go @@ -30,5 +30,5 @@ func (s lstatFS) Stat(name string) (fs.FileInfo, error) { func Glob(fileSystem vfs.FS, prefix string) ([]string, error) { return doublestar.Glob(lstatFS{ wrapped: fileSystem, - }, prefix) + }, prefix, doublestar.WithFailOnIOErrors()) } diff --git a/pkg/cmd/managedcmd_test.go b/pkg/cmd/managedcmd_test.go index bdcd61bf57b..6290b30161f 100644 --- a/pkg/cmd/managedcmd_test.go +++ b/pkg/cmd/managedcmd_test.go @@ -55,6 +55,20 @@ func TestManagedCmd(t *testing.T) { ".file", ), }, + { + name: "remove", + root: map[string]any{ + "/home/user": map[string]any{ + ".local/share/chezmoi/.chezmoiremove": chezmoitest.JoinLines( + ".remove", + ), + ".remove": "", + }, + }, + expectedOutput: chezmoitest.JoinLines( + ".remove", + ), + }, { name: "script_template", root: map[string]any{
chore
Better handle errors when globbing
711534a51184bdefd2fd0c6c19ab2094b1511d27
2024-07-06 04:10:32
Tom Payne
docs: Add link to article
false
diff --git a/assets/chezmoi.io/docs/links/articles.md.yaml b/assets/chezmoi.io/docs/links/articles.md.yaml index 18d7b25a4b5..16280346aad 100644 --- a/assets/chezmoi.io/docs/links/articles.md.yaml +++ b/assets/chezmoi.io/docs/links/articles.md.yaml @@ -421,3 +421,7 @@ articles: lang: TH title: 'จัดการ dotfiles ด้วย chezmoi' url: https://www.anuwong.com/blog/manage-dotfiles-with-chezmoi/ +- date: '2024-06-26' + version: 2.49.1 + title: 'Automate Your Dotfiles with Chezmoi' + url: https://learn.typecraft.dev/tutorial/our-place-chezmoi/
docs
Add link to article
7b83a17025476c2af84d1c4de3170283b90d5f8b
2022-04-22 02:47:57
Tom Payne
docs: Add troubleshooting entry on scripts on Termux
false
diff --git a/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/troubleshooting.md b/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/troubleshooting.md index dc85b3b2a43..d0434efb4f5 100644 --- a/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/troubleshooting.md +++ b/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/troubleshooting.md @@ -197,3 +197,20 @@ $ touch dot_config/.keep Now once that done `chezmoi add ~/.config/direnv/direnvrc` should work. For reference see [this issue](https://github.com/twpayne/chezmoi/issues/2006) + +## chezmoi reports `fork/exec ...: no such file or directory` when running scripts on Termux + +You are likely using a hardcoded script interpreter in the shebang line of your +scripts, e.g. + +```bash +#!/bin/bash +``` + +`/bin/bash` does not exist on Termux. You must update the shebang line to point +to the actual bash interpreter. The easiest way to do this is make the script a +template and use the `lookPath` template function, for example: + +``` +#!{{ lookPath "bash" }} +```
docs
Add troubleshooting entry on scripts on Termux
f86b5b8551c7688a089f1b801dee27ac30685c35
2022-03-24 20:36:38
Austin Ziegler
chore: Fix typo
false
diff --git a/assets/chezmoi.io/docs/user-guide/password-managers/1password.md b/assets/chezmoi.io/docs/user-guide/password-managers/1password.md index 6c72b8ef20f..b6d2a620d20 100644 --- a/assets/chezmoi.io/docs/user-guide/password-managers/1password.md +++ b/assets/chezmoi.io/docs/user-guide/password-managers/1password.md @@ -6,7 +6,7 @@ expose data as a template function. !!! note - The[1Password CLI 2.0](https://developer.1password.com/) has been released. + The [1Password CLI 2.0](https://developer.1password.com/) has been released. Examples will be shown using the changed details for this version and examples for 1Password CLI 1.x will follow.
chore
Fix typo
3640adc16e1695e702c39df6f3f9d2a9732cb0c1
2023-02-13 23:05:50
Tom Payne
chore: Export persistent state functions
false
diff --git a/pkg/chezmoi/persistentstate.go b/pkg/chezmoi/persistentstate.go index 3fc73c9da7e..373e02500de 100644 --- a/pkg/chezmoi/persistentstate.go +++ b/pkg/chezmoi/persistentstate.go @@ -7,13 +7,13 @@ var ( // EntryStateBucket is the bucket for recording the entry states. EntryStateBucket = []byte("entryState") - // gitRepoExternalState is the bucket for recording the state of commands + // GitRepoExternalStateBucket is the bucket for recording the state of commands // that modify directories. - gitRepoExternalState = []byte("gitRepoExternalState") + GitRepoExternalStateBucket = []byte("gitRepoExternalState") - // scriptStateBucket is the bucket for recording the state of run once + // ScriptStateBucket is the bucket for recording the state of run once // scripts. - scriptStateBucket = []byte("scriptState") + ScriptStateBucket = []byte("scriptState") stateFormat = formatJSON{} ) @@ -47,38 +47,20 @@ func PersistentStateBucketData(s PersistentState, bucket []byte) (map[string]any } // PersistentStateData returns the structured data in s. -func PersistentStateData(s PersistentState) (any, error) { - configStateData, err := PersistentStateBucketData(s, ConfigStateBucket) - if err != nil { - return nil, err - } - entryStateData, err := PersistentStateBucketData(s, EntryStateBucket) - if err != nil { - return nil, err - } - gitRepoExternalData, err := PersistentStateBucketData(s, gitRepoExternalState) - if err != nil { - return nil, err - } - scriptStateData, err := PersistentStateBucketData(s, scriptStateBucket) - if err != nil { - return nil, err +func PersistentStateData(s PersistentState, buckets map[string][]byte) (map[string]any, error) { + result := make(map[string]any) + for bucketName, bucketKey := range buckets { + stateData, err := PersistentStateBucketData(s, bucketKey) + if err != nil { + return nil, err + } + result[bucketName] = stateData } - return struct { - ConfigState any `json:"configState" yaml:"configState"` - EntryState any `json:"entryState" yaml:"entryState"` - GitRepoExternalData any `json:"gitRepoExternalState" yaml:"gitRepoExternalState"` - ScriptState any `json:"scriptState" yaml:"scriptState"` - }{ - ConfigState: configStateData, - EntryState: entryStateData, - GitRepoExternalData: gitRepoExternalData, - ScriptState: scriptStateData, - }, nil + return result, nil } -// persistentStateGet gets the value associated with key in bucket in s, if it exists. -func persistentStateGet(s PersistentState, bucket, key []byte, value any) (bool, error) { +// PersistentStateGet gets the value associated with key in bucket in s, if it exists. +func PersistentStateGet(s PersistentState, bucket, key []byte, value any) (bool, error) { data, err := s.Get(bucket, key) if err != nil { return false, err @@ -92,8 +74,8 @@ func persistentStateGet(s PersistentState, bucket, key []byte, value any) (bool, return true, nil } -// persistentStateSet sets the value associated with key in bucket in s. -func persistentStateSet(s PersistentState, bucket, key []byte, value any) error { +// PersistentStateSet sets the value associated with key in bucket in s. +func PersistentStateSet(s PersistentState, bucket, key []byte, value any) error { data, err := stateFormat.Marshal(value) if err != nil { return err diff --git a/pkg/chezmoi/sourcestate.go b/pkg/chezmoi/sourcestate.go index 58a6676a65c..5034cea6121 100644 --- a/pkg/chezmoi/sourcestate.go +++ b/pkg/chezmoi/sourcestate.go @@ -497,7 +497,7 @@ DESTABSPATH: } } if !sourceUpdate.destAbsPath.Empty() { - if err := persistentStateSet( + if err := PersistentStateSet( persistentState, EntryStateBucket, sourceUpdate.destAbsPath.Bytes(), sourceUpdate.entryState, ); err != nil { return err @@ -617,7 +617,7 @@ func (s *SourceState) Apply( if options.PreApplyFunc != nil { var lastWrittenEntryState *EntryState var entryState EntryState - ok, err := persistentStateGet(persistentState, EntryStateBucket, targetAbsPath.Bytes(), &entryState) + ok, err := PersistentStateGet(persistentState, EntryStateBucket, targetAbsPath.Bytes(), &entryState) if err != nil { return err } @@ -637,7 +637,7 @@ func (s *SourceState) Apply( // respect to the last written state, we record the effect of the last // apply as the last written state. if targetEntryState.Equivalent(actualEntryState) && !lastWrittenEntryState.Equivalent(actualEntryState) { - err := persistentStateSet(persistentState, EntryStateBucket, targetAbsPath.Bytes(), targetEntryState) + err := PersistentStateSet(persistentState, EntryStateBucket, targetAbsPath.Bytes(), targetEntryState) if err != nil { return err } @@ -656,7 +656,7 @@ func (s *SourceState) Apply( return nil } - return persistentStateSet(persistentState, EntryStateBucket, targetAbsPath.Bytes(), targetEntryState) + return PersistentStateSet(persistentState, EntryStateBucket, targetAbsPath.Bytes(), targetEntryState) } // Contains returns the source state entry for targetRelPath. diff --git a/pkg/chezmoi/targetstateentry.go b/pkg/chezmoi/targetstateentry.go index 6c99e1b367d..089381afc9c 100644 --- a/pkg/chezmoi/targetstateentry.go +++ b/pkg/chezmoi/targetstateentry.go @@ -90,8 +90,8 @@ func (t *TargetStateModifyDirWithCmd) Apply( } modifyDirWithCmdStateKey := []byte(actualStateEntry.Path().String()) - if err := persistentStateSet( - persistentState, gitRepoExternalState, modifyDirWithCmdStateKey, &modifyDirWithCmdState{ + if err := PersistentStateSet( + persistentState, GitRepoExternalStateBucket, modifyDirWithCmdStateKey, &modifyDirWithCmdState{ Name: actualStateEntry.Path(), RunAt: runAt, }); err != nil { @@ -120,7 +120,7 @@ func (t *TargetStateModifyDirWithCmd) SkipApply(persistentState PersistentState, return false, nil } modifyDirWithCmdKey := []byte(targetAbsPath.String()) - switch modifyDirWithCmdStateBytes, err := persistentState.Get(gitRepoExternalState, modifyDirWithCmdKey); { + switch modifyDirWithCmdStateBytes, err := persistentState.Get(GitRepoExternalStateBucket, modifyDirWithCmdKey); { case err != nil: return false, err case modifyDirWithCmdStateBytes == nil: @@ -328,7 +328,7 @@ func (t *TargetStateScript) Apply( } scriptStateKey := []byte(hex.EncodeToString(contentsSHA256)) - if err := persistentStateSet(persistentState, scriptStateBucket, scriptStateKey, &scriptState{ + if err := PersistentStateSet(persistentState, ScriptStateBucket, scriptStateKey, &scriptState{ Name: t.name, RunAt: runAt, }); err != nil { @@ -336,7 +336,7 @@ func (t *TargetStateScript) Apply( } entryStateKey := actualStateEntry.Path().Bytes() - if err := persistentStateSet(persistentState, EntryStateBucket, entryStateKey, &EntryState{ + if err := PersistentStateSet(persistentState, EntryStateBucket, entryStateKey, &EntryState{ Type: EntryStateTypeScript, ContentsSHA256: HexBytes(contentsSHA256), }); err != nil { @@ -381,7 +381,7 @@ func (t *TargetStateScript) SkipApply(persistentState PersistentState, targetAbs return false, err } scriptStateKey := []byte(hex.EncodeToString(contentsSHA256)) - switch scriptState, err := persistentState.Get(scriptStateBucket, scriptStateKey); { + switch scriptState, err := persistentState.Get(ScriptStateBucket, scriptStateKey); { case err != nil: return false, err case scriptState != nil: diff --git a/pkg/cmd/statecmd.go b/pkg/cmd/statecmd.go index 0845b0716eb..2eba9210da6 100644 --- a/pkg/cmd/statecmd.go +++ b/pkg/cmd/statecmd.go @@ -186,7 +186,12 @@ func (c *Config) runStateDeleteBucketCmd(cmd *cobra.Command, args []string) erro } func (c *Config) runStateDumpCmd(cmd *cobra.Command, args []string) error { - data, err := chezmoi.PersistentStateData(c.persistentState) + data, err := chezmoi.PersistentStateData(c.persistentState, map[string][]byte{ + "configState": chezmoi.ConfigStateBucket, + "entryState": chezmoi.EntryStateBucket, + "gitRepoExternalState": chezmoi.GitRepoExternalStateBucket, + "scriptState": chezmoi.ScriptStateBucket, + }) if err != nil { return err }
chore
Export persistent state functions
94337dc2cb228bfd9f782820815c5d5287b4f9af
2022-10-31 01:24:26
Tom Payne
chore: Add YAML formatting script
false
diff --git a/Makefile b/Makefile index 69d76acffef..6df910d3d66 100644 --- a/Makefile +++ b/Makefile @@ -117,6 +117,10 @@ format: ensure-gofumpt find . -name \*.go | xargs ./bin/gofumpt -extra -w find . -name \*.txtar | xargs ${GO} run ./internal/cmds/lint-txtar -w +.PHONY: format-yaml +format-yaml: + find . -name \*.yaml -o -name \*.yml | xargs ./assets/scripts/format-yaml.py + .PHONY: create-syso ensure-goversioninfo create-syso: ensure-goversioninfo ${GO} run ./internal/cmds/execute-template -output ./versioninfo.json ./assets/templates/versioninfo.json.tmpl diff --git a/assets/scripts/format-yaml.py b/assets/scripts/format-yaml.py new file mode 100755 index 00000000000..e3385b4e5dc --- /dev/null +++ b/assets/scripts/format-yaml.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 + +import sys + +from ruamel.yaml import YAML + + +def main(): + yaml = YAML() + for filename in sys.argv[1:]: + with open(filename) as file: + data = yaml.load(file) + with open(filename, 'w') as file: + yaml.dump(data, file) + + +if __name__ == '__main__': + main()
chore
Add YAML formatting script
5e6043c5f70bf790380683347b7e29c72341b337
2023-03-12 06:04:33
Tom Payne
chore: Enforce Go 1.19 minimum version
false
diff --git a/.golangci.yml b/.golangci.yml index e5696974cc0..72cd1018719 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,5 +1,5 @@ run: - go: '1.18' + go: '1.19' linters: enable: diff --git a/assets/chezmoi.io/docs/developer/developing-locally.md b/assets/chezmoi.io/docs/developer/developing-locally.md index f36c35b79c5..411fa7f45b5 100644 --- a/assets/chezmoi.io/docs/developer/developing-locally.md +++ b/assets/chezmoi.io/docs/developer/developing-locally.md @@ -2,7 +2,7 @@ chezmoi is written in [Go](https://golang.org) and development happens on [GitHub](https://github.com). chezmoi is a standard Go project, using standard -Go tooling. chezmoi requires Go 1.18 or later. +Go tooling. chezmoi requires Go 1.19 or later. Checkout chezmoi: diff --git a/assets/chezmoi.io/docs/install.md.tmpl b/assets/chezmoi.io/docs/install.md.tmpl index 1963f05fc16..6e2eaf310e6 100644 --- a/assets/chezmoi.io/docs/install.md.tmpl +++ b/assets/chezmoi.io/docs/install.md.tmpl @@ -252,7 +252,7 @@ pre-built binary and shell completions. ## Install from source -Download, build, and install chezmoi for your system with Go 1.18 or later: +Download, build, and install chezmoi for your system with Go 1.19 or later: ```console $ git clone https://github.com/twpayne/chezmoi.git diff --git a/main.go b/main.go index 110724568aa..b6c3fb7f428 100644 --- a/main.go +++ b/main.go @@ -1,4 +1,4 @@ -//go:build go1.18 +//go:build go1.19 //go:generate go run . completion bash -o completions/chezmoi-completion.bash //go:generate go run . completion fish -o completions/chezmoi.fish
chore
Enforce Go 1.19 minimum version
38ed4f8017270558c5740d286443190f07c90fbc
2025-02-05 14:07:56
Tom Payne
chore: Update dependencies
false
diff --git a/go.mod b/go.mod index 75c8053b4af..adf066fad0f 100644 --- a/go.mod +++ b/go.mod @@ -4,24 +4,24 @@ go 1.23.4 require ( filippo.io/age v1.2.1 - github.com/1password/onepassword-sdk-go v0.1.6 + github.com/1password/onepassword-sdk-go v0.1.7 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.1 github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.3.0 github.com/Masterminds/sprig/v3 v3.3.0 - github.com/Shopify/ejson v1.5.3 + github.com/Shopify/ejson v1.5.4 github.com/alecthomas/assert/v2 v2.11.0 github.com/aws/aws-sdk-go-v2 v1.36.0 - github.com/aws/aws-sdk-go-v2/config v1.29.4 - github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.16 + github.com/aws/aws-sdk-go-v2/config v1.29.5 + github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.17 github.com/bmatcuk/doublestar/v4 v4.8.1 github.com/bradenhilton/mozillainstallhash v1.0.1 github.com/charmbracelet/bubbles v0.20.0 - github.com/charmbracelet/bubbletea v1.2.4 + github.com/charmbracelet/bubbletea v1.3.0 github.com/charmbracelet/glamour v0.8.0 github.com/coreos/go-semver v0.3.1 github.com/fsnotify/fsnotify v1.8.0 github.com/go-git/go-git/v5 v5.13.2 - github.com/goccy/go-yaml v1.15.16 + github.com/goccy/go-yaml v1.15.17 github.com/google/go-github/v68 v68.0.0 github.com/google/renameio/v2 v2.0.0 github.com/gopasspw/gopass v1.15.15 @@ -51,11 +51,11 @@ require ( go.etcd.io/bbolt v1.3.11 go.uber.org/automaxprocs v1.6.0 golang.org/x/crypto v0.32.0 - golang.org/x/crypto/x509roots/fallback v0.0.0-20250118192723-a8ea4be81f07 - golang.org/x/oauth2 v0.25.0 - golang.org/x/sync v0.10.0 - golang.org/x/sys v0.29.0 - golang.org/x/term v0.28.0 + golang.org/x/crypto/x509roots/fallback v0.0.0-20250204190303-9290511cd23a + golang.org/x/oauth2 v0.26.0 + golang.org/x/sync v0.11.0 + golang.org/x/sys v0.30.0 + golang.org/x/term v0.29.0 gopkg.in/ini.v1 v1.67.0 howett.net/plist v1.0.1 mvdan.cc/sh/v3 v3.10.0 @@ -77,7 +77,7 @@ require ( github.com/alecthomas/chroma/v2 v2.15.0 // indirect github.com/alecthomas/repr v0.4.0 // indirect github.com/atotto/clipboard v0.1.4 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.57 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.58 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.27 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.31 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.31 // indirect @@ -86,7 +86,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.12 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.24.14 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.13 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.33.12 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.33.13 // indirect github.com/aws/smithy-go v1.22.2 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/aymerick/douceur v0.2.0 // indirect @@ -176,7 +176,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect golang.org/x/net v0.34.0 // indirect - golang.org/x/text v0.21.0 // indirect + golang.org/x/text v0.22.0 // indirect golang.org/x/tools v0.29.0 // indirect google.golang.org/protobuf v1.36.4 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect diff --git a/go.sum b/go.sum index 64ee7ec464d..7dbb06c1d17 100644 --- a/go.sum +++ b/go.sum @@ -32,8 +32,8 @@ filippo.io/age v1.2.1 h1:X0TZjehAZylOIj4DubWYU1vWQxv9bJpo+Uu2/LGhi1o= filippo.io/age v1.2.1/go.mod h1:JL9ew2lTN+Pyft4RiNGguFfOpewKwSHm5ayKD/A4004= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= -github.com/1password/onepassword-sdk-go v0.1.6 h1:oXmysmOSqhJ5S1+ViV33xwbrE8/0EJjPRo4a3o9afmU= -github.com/1password/onepassword-sdk-go v0.1.6/go.mod h1:tCgAKPZA64sVLmwizpOtFVc+OtXYHCwSp/+2Y+7CxyY= +github.com/1password/onepassword-sdk-go v0.1.7 h1:KGvK3nL5+jfDstcAVG5DZVQdAAJqZi1bhzPlPMI3jQs= +github.com/1password/onepassword-sdk-go v0.1.7/go.mod h1:tCgAKPZA64sVLmwizpOtFVc+OtXYHCwSp/+2Y+7CxyY= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0 h1:g0EZJwz7xkXQiZAI5xi9f3WWFYBlX1CPTrR+NDToRkQ= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0/go.mod h1:XCW7KnZet0Opnr7HccfUw1PLc4CjHqpcaxW8DHklNkQ= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.1 h1:1mvYtZfWQAnwNah/C+Z+Jb9rQH95LPE2vlmMuWAHJk8= @@ -73,8 +73,8 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/ProtonMail/go-crypto v1.1.5 h1:eoAQfK2dwL+tFSFpr7TbOaPNUbPiJj4fLYwwGE1FQO4= github.com/ProtonMail/go-crypto v1.1.5/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= -github.com/Shopify/ejson v1.5.3 h1:2TfdPKTkHXADrvxQrW+mOpl+btx0kDn4/kjzOQ1gIH8= -github.com/Shopify/ejson v1.5.3/go.mod h1:bVvQ3MaBCfMOkIp1rWZcot3TruYXCc7qUUbI1tjs/YM= +github.com/Shopify/ejson v1.5.4 h1:rE3THgxBjdSUcJTNTn1SYaAzaGyxvjkEssAZEJ+zD+s= +github.com/Shopify/ejson v1.5.4/go.mod h1:GZg88n4LpYqp92+tzWjvj+1aaiDJn7F1uWebQb4HbeQ= github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= github.com/alecthomas/chroma/v2 v2.15.0 h1:LxXTQHFoYrstG2nnV9y2X5O94sOBzf0CIUpSTbpxvMc= @@ -91,10 +91,10 @@ github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/aws-sdk-go-v2 v1.36.0 h1:b1wM5CcE65Ujwn565qcwgtOTT1aT4ADOHHgglKjG7fk= github.com/aws/aws-sdk-go-v2 v1.36.0/go.mod h1:5PMILGVKiW32oDzjj6RU52yrNrDPUHcbZQYr1sM7qmM= -github.com/aws/aws-sdk-go-v2/config v1.29.4 h1:ObNqKsDYFGr2WxnoXKOhCvTlf3HhwtoGgc+KmZ4H5yg= -github.com/aws/aws-sdk-go-v2/config v1.29.4/go.mod h1:j2/AF7j/qxVmsNIChw1tWfsVKOayJoGRDjg1Tgq7NPk= -github.com/aws/aws-sdk-go-v2/credentials v1.17.57 h1:kFQDsbdBAR3GZsB8xA+51ptEnq9TIj3tS4MuP5b+TcQ= -github.com/aws/aws-sdk-go-v2/credentials v1.17.57/go.mod h1:2kerxPUUbTagAr/kkaHiqvj/bcYHzi2qiJS/ZinllU0= +github.com/aws/aws-sdk-go-v2/config v1.29.5 h1:4lS2IB+wwkj5J43Tq/AwvnscBerBJtQQ6YS7puzCI1k= +github.com/aws/aws-sdk-go-v2/config v1.29.5/go.mod h1:SNzldMlDVbN6nWxM7XsUiNXPSa1LWlqiXtvh/1PrJGg= +github.com/aws/aws-sdk-go-v2/credentials v1.17.58 h1:/d7FUpAPU8Lf2KUdjniQvfNdlMID0Sd9pS23FJ3SS9Y= +github.com/aws/aws-sdk-go-v2/credentials v1.17.58/go.mod h1:aVYW33Ow10CyMQGFgC0ptMRIqJWvJ4nxZb0sUiuQT/A= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.27 h1:7lOW8NUwE9UZekS1DYoiPdVAqZ6A+LheHWb+mHbNOq8= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.27/go.mod h1:w1BASFIPOPUae7AgaH4SbjNbfdkxuggLyGfNFTn8ITY= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.31 h1:lWm9ucLSRFiI4dQQafLrEOmEDGry3Swrz0BIRdiHJqQ= @@ -107,14 +107,14 @@ github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 h1:D4oz8/C github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2/go.mod h1:Za3IHqTQ+yNcRHxu1OFucBh0ACZT4j4VQFF0BqpZcLY= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.12 h1:O+8vD2rGjfihBewr5bT+QUfYUHIxCVgG61LHoT59shM= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.12/go.mod h1:usVdWJaosa66NMvmCrr08NcWDBRv4E6+YFG2pUdw1Lk= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.16 h1:tIgXdHiHVELZm56dCK7fQ8c4gFMoz6AkhHksrxpmAFQ= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.16/go.mod h1:5WGcD7Mks8G/VNlpHp2ZwfP5pVIZp0zp8nauLU7NuLM= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.17 h1:OMMxv2xpGkp1cVc2JT88X8n2xEHBabIznm8UHvDrF8A= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.17/go.mod h1:5WGcD7Mks8G/VNlpHp2ZwfP5pVIZp0zp8nauLU7NuLM= github.com/aws/aws-sdk-go-v2/service/sso v1.24.14 h1:c5WJ3iHz7rLIgArznb3JCSQT3uUMiz9DLZhIX+1G8ok= github.com/aws/aws-sdk-go-v2/service/sso v1.24.14/go.mod h1:+JJQTxB6N4niArC14YNtxcQtwEqzS3o9Z32n7q33Rfs= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.13 h1:f1L/JtUkVODD+k1+IiSJUUv8A++2qVr+Xvb3xWXETMU= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.13/go.mod h1:tvqlFoja8/s0o+UruA1Nrezo/df0PzdunMDDurUfg6U= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.12 h1:fqg6c1KVrc3SYWma/egWue5rKI4G2+M4wMQN2JosNAA= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.12/go.mod h1:7Yn+p66q/jt38qMoVfNvjbm3D89mGBnkwDcijgtih8w= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.13 h1:3LXNnmtH3TURctC23hnC0p/39Q5gre3FI7BNOiDcVWc= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.13/go.mod h1:7Yn+p66q/jt38qMoVfNvjbm3D89mGBnkwDcijgtih8w= github.com/aws/smithy-go v1.22.2 h1:6D9hW43xKFrRx/tXXfAlIZc4JI+yQe6snnWcQyxSyLQ= github.com/aws/smithy-go v1.22.2/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= @@ -145,8 +145,8 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charmbracelet/bubbles v0.20.0 h1:jSZu6qD8cRQ6k9OMfR1WlM+ruM8fkPWkHvQWD9LIutE= github.com/charmbracelet/bubbles v0.20.0/go.mod h1:39slydyswPy+uVOHZ5x/GjwVAFkCsV8IIVy+4MhzwwU= -github.com/charmbracelet/bubbletea v1.2.4 h1:KN8aCViA0eps9SCOThb2/XPIlea3ANJLUkv3KnQRNCE= -github.com/charmbracelet/bubbletea v1.2.4/go.mod h1:Qr6fVQw+wX7JkWWkVyXYk/ZUQ92a6XNekLXa3rR18MM= +github.com/charmbracelet/bubbletea v1.3.0 h1:fPMyirm0u3Fou+flch7hlJN9krlnVURrkUVDwqXjoAc= +github.com/charmbracelet/bubbletea v1.3.0/go.mod h1:eTaHfqbIwvBhFQM/nlT1NsGc4kp8jhF8LfUK67XiTDM= github.com/charmbracelet/glamour v0.8.0 h1:tPrjL3aRcQbn++7t18wOpgLyl8wrOHUEDS7IZ68QtZs= github.com/charmbracelet/glamour v0.8.0/go.mod h1:ViRgmKkf3u5S7uakt2czJ272WSg2ZenlYEZXT2x7Bjw= github.com/charmbracelet/harmonica v0.2.0 h1:8NxJWRWg/bzKqqEaaeFNipOu77YR5t8aSwG4pgaUBiQ= @@ -242,8 +242,8 @@ github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7 github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/goccy/go-yaml v1.15.16 h1:PMTVcGI9uNPIn7KLs0H7KC1rE+51yPl5YNh4i8rGuRA= -github.com/goccy/go-yaml v1.15.16/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= +github.com/goccy/go-yaml v1.15.17 h1:dK4FbbTTEOZTLH/NW3/xBqg0JdC14YKVmYwS9GT3H60= +github.com/goccy/go-yaml v1.15.17/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -636,8 +636,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= -golang.org/x/crypto/x509roots/fallback v0.0.0-20250118192723-a8ea4be81f07 h1:Tuk3hxOkRoX4Xwph6/tRU1wGumEsVYM2TZfvAC6MllM= -golang.org/x/crypto/x509roots/fallback v0.0.0-20250118192723-a8ea4be81f07/go.mod h1:kNa9WdvYnzFwC79zRpLRMJbdEFlhyM5RPFBBZp/wWH8= +golang.org/x/crypto/x509roots/fallback v0.0.0-20250204190303-9290511cd23a h1:7InM1wOVdRir08zpJRVKvcnwMIIEV5Jde3g4YUOy43U= +golang.org/x/crypto/x509roots/fallback v0.0.0-20250204190303-9290511cd23a/go.mod h1:kNa9WdvYnzFwC79zRpLRMJbdEFlhyM5RPFBBZp/wWH8= golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c h1:KL/ZBHXgKGVmuZBZ01Lt57yE5ws8ZPSkkihmEyq7FXc= golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -652,13 +652,13 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= -golang.org/x/oauth2 v0.25.0 h1:CY4y7XT9v0cRI9oupztF8AgiIu99L/ksR/Xp/6jrZ70= -golang.org/x/oauth2 v0.25.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.26.0 h1:afQXWNNaeC4nvZ0Ed9XvCCzXM6UHJG7iCg0W4fPqSBE= +golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -676,23 +676,23 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= -golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457 h1:zf5N6UOrA487eEFacMePxjXAJctxKmyjKUsjA11Uzuk= golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= -golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= +golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
chore
Update dependencies
e672a3288b413f9fe11f59c429bd622a51b91034
2025-01-31 06:27:03
Braden Hilton
docs: Update wording in .chezmoidata pages
false
diff --git a/assets/chezmoi.io/docs/reference/special-directories/chezmoidata.md b/assets/chezmoi.io/docs/reference/special-directories/chezmoidata.md index ce85774f3bc..46d1270dcc7 100644 --- a/assets/chezmoi.io/docs/reference/special-directories/chezmoidata.md +++ b/assets/chezmoi.io/docs/reference/special-directories/chezmoidata.md @@ -1,4 +1,5 @@ # `.chezmoidata` If a directory called `.chezmoidata` exists in the source state, then all files -in it are interpreted as template data in the format given by their extension. +in it are interpreted as structured static data in the format given by their +extension. This data can then be used in templates. diff --git a/assets/chezmoi.io/docs/reference/special-files/chezmoidata-format.md b/assets/chezmoi.io/docs/reference/special-files/chezmoidata-format.md index f4af86d16e0..d4ff8995c07 100644 --- a/assets/chezmoi.io/docs/reference/special-files/chezmoidata-format.md +++ b/assets/chezmoi.io/docs/reference/special-files/chezmoidata-format.md @@ -1,7 +1,8 @@ # `.chezmoidata.$FORMAT` If a file called `.chezmoidata.$FORMAT` exists in the source state, it is -interpreted as template data in the given format. +interpreted as structured static data in the given format. This data can +then be used in templates. !!! example
docs
Update wording in .chezmoidata pages
eba3ef027ade49df9813dc80d8efbad891c02961
2022-11-15 05:16:31
Tom Payne
chore: Check that not both of --force and --interactive flags are set
false
diff --git a/pkg/cmd/config.go b/pkg/cmd/config.go index b3f30796529..f386516fbf4 100644 --- a/pkg/cmd/config.go +++ b/pkg/cmd/config.go @@ -1669,6 +1669,10 @@ func (c *Config) persistentPreRunRootE(cmd *cobra.Command, args []string) error } } + if c.force && c.interactive { + return errors.New("the --force and --interactive flags are mutually exclusive") + } + // Configure the logger. log.Logger = log.Output(zerolog.NewConsoleWriter( func(w *zerolog.ConsoleWriter) {
chore
Check that not both of --force and --interactive flags are set
5a31a1c59827d14b980a8a7bb4c40ffb9b585cea
2024-06-05 02:46:04
Tom Payne
chore: Build with Go 1.22.4
false
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 17432b5db84..f5863b75bb7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ env: CHOCOLATEY_VERSION: 2.2.2 # https://github.com/chocolatey/choco/releases EDITORCONFIG_CHECKER_VERSION: 3.0.1 # https://github.com/editorconfig-checker/editorconfig-checker/releases FIND_TYPOS_VERSION: 0.0.3 # https://github.com/twpayne/find-typos/tags - GO_VERSION: 1.22.3 # https://go.dev/doc/devel/release + GO_VERSION: 1.22.4 # https://go.dev/doc/devel/release GOFUMPT_VERSION: 0.6.0 # https://github.com/mvdan/gofumpt/releases GOLANGCI_LINT_VERSION: 1.59.0 # https://github.com/golangci/golangci-lint/releases GOLINES_VERSION: 0.12.2 # https://github.com/segmentio/golines/releases
chore
Build with Go 1.22.4
b91d3544dfd7f712ac0182b99668eb19d0bfc0d0
2022-03-07 03:47:48
Tom Payne
chore: Remove duplicate media entry
false
diff --git a/assets/chezmoi.io/docs/links/articles-podcasts-and-videos.md.yaml b/assets/chezmoi.io/docs/links/articles-podcasts-and-videos.md.yaml index 786011f6aa8..0e1da554d27 100644 --- a/assets/chezmoi.io/docs/links/articles-podcasts-and-videos.md.yaml +++ b/assets/chezmoi.io/docs/links/articles-podcasts-and-videos.md.yaml @@ -193,10 +193,6 @@ articles: lang: 'RU' title: 'Синхронизация системных настроек' url: 'https://habr.com/en/post/585578/' -- date: '2021-11-23' - version: '2.8.0' - title: 'chezmoi dotfile management' - url: 'https://www.jacobbolda.com/chezmoi-dotfile-management' - date: '2021-11-26' version: '2.8.0' title: 'Weekly Journal 47 - chezmoi, neovim'
chore
Remove duplicate media entry
ca6015a0bbfa5bc355fd7d7542c22367d706f904
2022-10-11 23:08:50
Filippo Bonazzi
docs: Add install instructions for openSUSE Tumbleweed
false
diff --git a/assets/chezmoi.io/docs/install.md.tmpl b/assets/chezmoi.io/docs/install.md.tmpl index d3a189818d1..c30865ab9b5 100644 --- a/assets/chezmoi.io/docs/install.md.tmpl +++ b/assets/chezmoi.io/docs/install.md.tmpl @@ -45,6 +45,12 @@ Install chezmoi with your package manager with a single command: nix-env -i chezmoi ``` + === "openSUSE Tumbleweed" + + ```sh + zypper install chezmoi + ``` + === "Termux" ```sh
docs
Add install instructions for openSUSE Tumbleweed
e50b471dad2db1d2bf77ad9178be5342eb376088
2023-03-27 12:56:49
Tom Payne
docs: Add link to video
false
diff --git a/assets/chezmoi.io/docs/links/links.yaml b/assets/chezmoi.io/docs/links/links.yaml index d6e6eaa3362..b485217bf0b 100644 --- a/assets/chezmoi.io/docs/links/links.yaml +++ b/assets/chezmoi.io/docs/links/links.yaml @@ -357,6 +357,13 @@ articles: version: 2.24.0 title: 'Shit Hot Dotfiles' url: https://kolv.in/posts/dotfile-managment +- data: '2022-12-15' + version: 2.27.3 + title: 'Archivos de configuración fácil con chezmoi' + lang: ES + formats: + - video + url: https://www.youtube.com/watch?v=Xsh2DGSe6Lg - date: '2023-01-05' version: 2.29.1 title: '既存の dotfiles を chezmoi で管理する'
docs
Add link to video
da66d6dfa84a4593f562cac82ee382a03f6885de
2022-12-06 01:02:01
Tom Payne
feat: Add lstat template function
false
diff --git a/assets/chezmoi.io/docs/reference/templates/functions/lstat.md b/assets/chezmoi.io/docs/reference/templates/functions/lstat.md new file mode 100644 index 00000000000..204509f4ed9 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/lstat.md @@ -0,0 +1,19 @@ +# `lstat` *name* + +`lstat` runs [`os.Lstat`](https://pkg.go.dev/os#File.Lstat) on *name*. If *name* +exists it returns structured data. If *name* does not exist then it returns a +false value. If `os.Lstat` returns any other error then it raises an error. The +structured value returned if *name* exists contains the fields `name`, `size`, +`mode`, `perm`, `modTime`, `isDir`, and `type`. + +`lstat` is not hermetic: its return value depends on the state of the filesystem +at the moment the template is executed. Exercise caution when using it in your +templates. + +!!! example + + ``` + {{ if eq (joinPath .chezmoi.homeDir ".xinitrc" | lstat).type "symlink" }} + # ~/.xinitrc exists and is a symlink + {{ end }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/stat.md b/assets/chezmoi.io/docs/reference/templates/functions/stat.md index df57fe5774d..788bdb4b965 100644 --- a/assets/chezmoi.io/docs/reference/templates/functions/stat.md +++ b/assets/chezmoi.io/docs/reference/templates/functions/stat.md @@ -4,7 +4,7 @@ exists it returns structured data. If *name* does not exist then it returns a false value. If `os.Stat` returns any other error then it raises an error. The structured value returned if *name* exists contains the fields `name`, `size`, -`mode`, `perm`, `modTime`, and `isDir`. +`mode`, `perm`, `modTime`, `isDir`, and `type`. `stat` is not hermetic: its return value depends on the state of the filesystem at the moment the template is executed. Exercise caution when using it in your diff --git a/assets/chezmoi.io/mkdocs.yml b/assets/chezmoi.io/mkdocs.yml index d75c0b54a86..0a026fbd003 100644 --- a/assets/chezmoi.io/mkdocs.yml +++ b/assets/chezmoi.io/mkdocs.yml @@ -187,6 +187,7 @@ nav: - ioreg: reference/templates/functions/ioreg.md - joinPath: reference/templates/functions/joinPath.md - lookPath: reference/templates/functions/lookPath.md + - lstat: reference/templates/functions/lstat.md - mozillaInstallHash: reference/templates/functions/mozillaInstallHash.md - output: reference/templates/functions/output.md - quoteList: reference/templates/functions/quoteList.md diff --git a/pkg/chezmoi/chezmoi.go b/pkg/chezmoi/chezmoi.go index e42349bfc81..0bbb8a5c516 100644 --- a/pkg/chezmoi/chezmoi.go +++ b/pkg/chezmoi/chezmoi.go @@ -115,7 +115,7 @@ var knownTargetFiles = newSet( "chezmoistate.boltdb", ) -var modeTypeNames = map[fs.FileMode]string{ +var FileModeTypeNames = map[fs.FileMode]string{ 0: "file", fs.ModeDir: "dir", fs.ModeSymlink: "symlink", @@ -297,7 +297,7 @@ func isEmpty(data []byte) bool { // modeTypeName returns a string representation of mode. func modeTypeName(mode fs.FileMode) string { - if name, ok := modeTypeNames[mode.Type()]; ok { + if name, ok := FileModeTypeNames[mode.Type()]; ok { return name } return fmt.Sprintf("0o%o: unknown type", mode.Type()) diff --git a/pkg/cmd/config.go b/pkg/cmd/config.go index 8f993f893e6..c4fb94464c1 100644 --- a/pkg/cmd/config.go +++ b/pkg/cmd/config.go @@ -369,6 +369,7 @@ func newConfig(options ...configOption) (*Config, error) { "lastpass": c.lastpassTemplateFunc, "lastpassRaw": c.lastpassRawTemplateFunc, "lookPath": c.lookPathTemplateFunc, + "lstat": c.lstatTemplateFunc, "mozillaInstallHash": c.mozillaInstallHashTemplateFunc, "onepassword": c.onepasswordTemplateFunc, "onepasswordDetailsFields": c.onepasswordDetailsFieldsTemplateFunc, diff --git a/pkg/cmd/templatefuncs.go b/pkg/cmd/templatefuncs.go index e0372f78cd6..990425a67c3 100644 --- a/pkg/cmd/templatefuncs.go +++ b/pkg/cmd/templatefuncs.go @@ -245,6 +245,17 @@ func (c *Config) lookPathTemplateFunc(file string) string { } } +func (c *Config) lstatTemplateFunc(name string) any { + switch fileInfo, err := c.fileSystem.Lstat(name); { + case err == nil: + return fileInfoToMap(fileInfo) + case errors.Is(err, fs.ErrNotExist): + return nil + default: + panic(err) + } +} + func (c *Config) mozillaInstallHashTemplateFunc(path string) string { mozillaInstallHash, err := mozillainstallhash.MozillaInstallHash(path) if err != nil { @@ -345,14 +356,7 @@ func (c *Config) setValueAtPathTemplateFunc(path, value, dict any) any { func (c *Config) statTemplateFunc(name string) any { switch fileInfo, err := c.fileSystem.Stat(name); { case err == nil: - return map[string]any{ - "name": fileInfo.Name(), - "size": fileInfo.Size(), - "mode": int(fileInfo.Mode()), - "perm": int(fileInfo.Mode().Perm()), - "modTime": fileInfo.ModTime().Unix(), - "isDir": fileInfo.IsDir(), - } + return fileInfoToMap(fileInfo) case errors.Is(err, fs.ErrNotExist): return nil default: @@ -384,6 +388,18 @@ func (c *Config) toYamlTemplateFunc(data any) string { return string(yaml) } +func fileInfoToMap(fileInfo fs.FileInfo) map[string]any { + return map[string]any{ + "name": fileInfo.Name(), + "size": fileInfo.Size(), + "mode": int(fileInfo.Mode()), + "perm": int(fileInfo.Mode().Perm()), + "modTime": fileInfo.ModTime().Unix(), + "isDir": fileInfo.IsDir(), + "type": chezmoi.FileModeTypeNames[fileInfo.Mode()&fs.ModeType], + } +} + func iniFileToMap(file *ini.File) map[string]any { m := make(map[string]any) for _, section := range file.Sections() { diff --git a/pkg/cmd/testdata/scripts/templatefuncs.txtar b/pkg/cmd/testdata/scripts/templatefuncs.txtar index ef4d2f2d05d..d9894a347f8 100644 --- a/pkg/cmd/testdata/scripts/templatefuncs.txtar +++ b/pkg/cmd/testdata/scripts/templatefuncs.txtar @@ -3,6 +3,8 @@ [!windows] chmod 755 bin/ioreg [windows] unix2dos bin/chezmoi-output-test.cmd +symlink $HOME/symlink -> dir + # test comment template function exec chezmoi execute-template '{{ "line1\nline2" | comment "# " }}' rmfinalnewline golden/comment @@ -52,6 +54,10 @@ stdout go$exe exec chezmoi execute-template '{{ lookPath "/non-existing-file" }}' ! stdout . +# test lstat template function +exec chezmoi execute-template '{{ (joinPath .chezmoi.homeDir "symlink" | lstat).type }}' +stdout ^symlink$ + # test mozillaInstallHash template function exec chezmoi execute-template '{{ mozillaInstallHash "/Applications/Firefox.app/Contents/MacOS" }}' stdout 2656FF1E876E9973 @@ -79,7 +85,7 @@ exec chezmoi execute-template '{{ dict "key" "value" "section" (dict "subkey" "s cmp stdout golden/toIni # test stat template function -exec chezmoi execute-template '{{ (stat ".").isDir }}' +exec chezmoi execute-template '{{ (joinPath .chezmoi.homeDir "symlink" | stat).isDir }}' stdout true # test that the output template function returns a command's output @@ -187,5 +193,6 @@ subkey = subvalue chezmoi:template:left-delimiter=[[ right-delimiter=]] [[ . ]] -- home/user/.local/share/chezmoi/template -- +-- home/user/dir/.keep -- -- home/user/file1.txt -- -- home/user/file2.txt --
feat
Add lstat template function
24a990d00750e918f781755f9a4b8775a8036544
2024-05-25 21:21:51
Braden Hilton
fix: fix error when determining GOARCH in install.ps1
false
diff --git a/assets/scripts/install.ps1 b/assets/scripts/install.ps1 index 7f22989e2ef..e66da29dc06 100644 --- a/assets/scripts/install.ps1 +++ b/assets/scripts/install.ps1 @@ -45,9 +45,14 @@ param ( $ChezmoiArgs ) -function Write-DebugVariable ($variable) { - $debugVariable = Get-Variable -Name $variable - Write-Debug "$( $debugVariable.Name ): $( $debugVariable.Value )" +function Write-DebugVariable { + param ( + [string[]]$variables + ) + foreach ($variable in $variables) { + $debugVariable = Get-Variable -Name $variable + Write-Debug "$( $debugVariable.Name ): $( $debugVariable.Value )" + } } function Invoke-CleanUp ($directory) { @@ -83,29 +88,38 @@ function Get-GoOS { if ($isOSPlatform.Invoke($osPlatform::Windows)) { return 'windows' } if ($isOSPlatform.Invoke($osPlatform::Linux)) { return 'linux' } if ($isOSPlatform.Invoke($osPlatform::OSX)) { return 'darwin' } + + Write-Error 'unable to determine GOOS' } function Get-GoArch { $goArch = @{ - 'Arm' = 'arm' - 'Arm64' = 'arm64' - 'X86' = 'i386' - 'X64' = 'amd64' + '32-bit' = 'i386' + '64-bit' = 'amd64' + 'Arm' = 'arm' + 'Arm64' = 'arm64' + 'X86' = 'i386' + 'X64' = 'amd64' } - $arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString() + $arch = $null - if ((-not $arch) -and [System.Environment]::Is64BitOperatingSystem) { - $arch = 'X64' + if ($PSVersionTable.PSEdition -eq 'Desktop') { + $arch = (Get-CimInstance -Class Win32_OperatingSystem).OSArchitecture + } else { + $arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString() + + if ([string]::IsNullOrEmpty($arch)) { + $arch = if ([System.Environment]::Is64BitOperatingSystem) { + 'X64' + } else { + 'X86' + } + } } - if (-not $arch) { - $cimArch = (Get-CimInstance -Class Win32_OperatingSystem).OSArchitecture - if ($cimArch.StartsWith('32')) { - $arch = 'X86' - } else { - $arch = 'X64' - } + if ([string]::IsNullOrEmpty($arch)) { + Write-Error 'unable to determine GOARCH' } return $goArch[$arch] @@ -175,8 +189,7 @@ function Expand-ChezmoiArchive ($path) { } } -# some functions require fetching of non-existent properties to not error -Set-StrictMode -Off +Set-StrictMode -Version 3.0 [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 @@ -202,9 +215,7 @@ do { } while (Test-Path -Path $tempDir) New-Item -ItemType Directory -Path $tempDir | Out-Null -foreach ($variableName in @('BinDir', 'Tag', 'ChezmoiArgs', 'tempDir')) { - Write-DebugVariable $variableName -} +Write-DebugVariable 'BinDir', 'Tag', 'ChezmoiArgs', 'tempDir' $goOS = Get-GoOS $goArch = Get-GoArch @@ -230,15 +241,11 @@ switch ($goOS) { break } } -foreach ($variableName in @('binarySuffix', 'archiveFormat', 'goOSExtra')) { - Write-DebugVariable $variableName -} +Write-DebugVariable 'binarySuffix', 'archiveFormat', 'goOSExtra' $archiveFilename = "chezmoi_${version}_${goOS}${goOSExtra}_${goArch}.${archiveFormat}" $tempArchivePath = Join-Path -Path $tempDir -ChildPath $archiveFilename -foreach ($variableName in @('archiveFilename', 'tempArchivePath')) { - Write-DebugVariable $variableName -} +Write-DebugVariable 'archiveFilename', 'tempArchivePath' Invoke-FileDownload "${BaseUrl}/download/${realTag}/${archiveFilename}" $tempArchivePath $checksums = Get-Checksums $realTag $version @@ -248,9 +255,7 @@ Expand-ChezmoiArchive $tempArchivePath $binaryFilename = "chezmoi${binarySuffix}" $tempBinaryPath = Join-Path -Path $tempDir -ChildPath $binaryFilename -foreach ($variableName in @('binaryFilename', 'tempBinaryPath')) { - Write-DebugVariable $variableName -} +Write-DebugVariable 'binaryFilename', 'tempBinaryPath' [System.IO.Directory]::CreateDirectory($BinDir) | Out-Null $binary = Join-Path -Path $BinDir -ChildPath $binaryFilename Write-DebugVariable 'binary'
fix
fix error when determining GOARCH in install.ps1
0355a62a8afdb820ffa22291e56e0dafec6f49c0
2024-09-04 16:09:46
Tom Payne
docs: Add link to blog
false
diff --git a/assets/chezmoi.io/docs/links/articles.md.yaml b/assets/chezmoi.io/docs/links/articles.md.yaml index 09083e416aa..68ca27be86b 100644 --- a/assets/chezmoi.io/docs/links/articles.md.yaml +++ b/assets/chezmoi.io/docs/links/articles.md.yaml @@ -433,3 +433,8 @@ articles: version: 2.51.0 title: 'Managing dotfiles with chezmoi' url: https://wqplease.com/p/managing-dotfiles-with-chezmoi +- date: '2024-08-30' + version: 2.52.1 + lang: JP + title: 'dotfiles管理をchezmoiに移行する' + url: https://nsakki55.hatenablog.com/entry/2024/08/30/125246
docs
Add link to blog
62c29c5c54a05462ade82e0b89139d075832dc8e
2023-06-02 04:34:36
Tom Payne
chore: Tidy up list of chezmoi files and directories
false
diff --git a/pkg/chezmoi/chezmoi.go b/pkg/chezmoi/chezmoi.go index 559f49f73a1..d2c2bba1ca0 100644 --- a/pkg/chezmoi/chezmoi.go +++ b/pkg/chezmoi/chezmoi.go @@ -94,26 +94,27 @@ var knownPrefixedFiles = newSet( Prefix+".toml"+TemplateSuffix, Prefix+".yaml"+TemplateSuffix, RootName, + VersionName, dataName+".json", dataName+".toml", dataName+".yaml", - externalName+".json", externalName+".json"+TemplateSuffix, - externalName+".toml", + externalName+".json", externalName+".toml"+TemplateSuffix, - externalName+".yaml", + externalName+".toml", externalName+".yaml"+TemplateSuffix, - ignoreName, + externalName+".yaml", ignoreName+TemplateSuffix, - removeName, + ignoreName, removeName+TemplateSuffix, - VersionName, + removeName, ) // knownPrefixedDirs is a set of known dirnames with the .chezmoi prefix. var knownPrefixedDirs = newSet( - scriptsDirName, TemplatesDirName, + dataName, + scriptsDirName, ) // knownTargetFiles is a set of known target files that should not be managed
chore
Tidy up list of chezmoi files and directories
cbac205c131403cd4e078b952c385f175f0ba346
2021-11-09 04:48:39
Tom Payne
feat: Add --reverse option to diff command
false
diff --git a/docs/REFERENCE.md b/docs/REFERENCE.md index aa1c3759d74..5d6b9b3e6df 100644 --- a/docs/REFERENCE.md +++ b/docs/REFERENCE.md @@ -1169,6 +1169,11 @@ respectively. The default value of `diff.args` is `["{{ .Destination }}", "{{ .Target }}"]`. If `diff.args` does not contain any template arguments then `{{ .Destination }}` and `{{ .Target }}` will be appended automatically. +#### `--reverse` + +Reverse the direction of the diff, i.e. show the changes to the target required +to match the destination. + #### `--pager` *pager* Pager to use for output. diff --git a/internal/chezmoi/externaldiffsystem.go b/internal/chezmoi/externaldiffsystem.go index 4c479321fdf..8d6de4c3454 100644 --- a/internal/chezmoi/externaldiffsystem.go +++ b/internal/chezmoi/externaldiffsystem.go @@ -19,15 +19,22 @@ type ExternalDiffSystem struct { args []string destDirAbsPath AbsPath tempDirAbsPath AbsPath + reverse bool +} + +// ExternalDiffSystemOptions are options for NewExternalDiffSystem. +type ExternalDiffSystemOptions struct { + Reverse bool } // NewExternalDiffSystem creates a new ExternalDiffSystem. -func NewExternalDiffSystem(system System, command string, args []string, destDirAbsPath AbsPath) *ExternalDiffSystem { +func NewExternalDiffSystem(system System, command string, args []string, destDirAbsPath AbsPath, options *ExternalDiffSystemOptions) *ExternalDiffSystem { return &ExternalDiffSystem{ system: system, command: command, args: args, destDirAbsPath: destDirAbsPath, + reverse: options.Reverse, } } @@ -185,6 +192,10 @@ func (s *ExternalDiffSystem) runDiffCommand(destAbsPath, targetAbsPath AbsPath) Target: targetAbsPath.String(), } + if s.reverse { + templateData.Destination, templateData.Target = templateData.Target, templateData.Destination + } + args := make([]string, 0, len(s.args)) // Work around a regression introduced in 2.1.5 // (https://github.com/twpayne/chezmoi/pull/1328) in a user-friendly way. diff --git a/internal/chezmoi/gitdiffsystem.go b/internal/chezmoi/gitdiffsystem.go index 912a4d3f7c9..3940b3c45db 100644 --- a/internal/chezmoi/gitdiffsystem.go +++ b/internal/chezmoi/gitdiffsystem.go @@ -18,20 +18,28 @@ import ( type GitDiffSystem struct { system System dirAbsPath AbsPath + reverse bool unifiedEncoder *diff.UnifiedEncoder } +// GetDiffSystemOptions are options for NewGitDiffSystem. +type GitDiffSystemOptions struct { + Color bool + Reverse bool +} + // NewGitDiffSystem returns a new GitDiffSystem. Output is written to w, the // dirAbsPath is stripped from paths, and color controls whether the output // contains ANSI color escape sequences. -func NewGitDiffSystem(system System, w io.Writer, dirAbsPath AbsPath, color bool) *GitDiffSystem { +func NewGitDiffSystem(system System, w io.Writer, dirAbsPath AbsPath, options *GitDiffSystemOptions) *GitDiffSystem { unifiedEncoder := diff.NewUnifiedEncoder(w, diff.DefaultContextLines) - if color { + if options.Color { unifiedEncoder.SetColor(diff.NewColorConfig()) } return &GitDiffSystem{ system: system, dirAbsPath: dirAbsPath, + reverse: options.Reverse, unifiedEncoder: unifiedEncoder, } } @@ -136,17 +144,21 @@ func (s *GitDiffSystem) Rename(oldpath, newpath AbsPath) error { default: fileMode = filemode.FileMode(fromFileInfo.Mode()) } + fromPath, toPath := s.trimPrefix(oldpath), s.trimPrefix(newpath) + if s.reverse { + fromPath, toPath = toPath, fromPath + } if err := s.unifiedEncoder.Encode(&gitDiffPatch{ filePatches: []diff.FilePatch{ &gitDiffFilePatch{ from: &gitDiffFile{ fileMode: fileMode, - relPath: s.trimPrefix(oldpath), + relPath: fromPath, hash: hash, }, to: &gitDiffFile{ fileMode: fileMode, - relPath: s.trimPrefix(newpath), + relPath: toPath, hash: hash, }, }, @@ -170,7 +182,11 @@ func (s *GitDiffSystem) RunIdempotentCmd(cmd *exec.Cmd) error { // RunScript implements System.RunScript. func (s *GitDiffSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, interpreter *Interpreter) error { mode := fs.FileMode(filemode.Executable) - diffPatch, err := DiffPatch(scriptname, nil, mode, data, mode) + fromData, toData := []byte(nil), data + if s.reverse { + fromData, toData = toData, fromData + } + diffPatch, err := DiffPatch(scriptname, fromData, mode, toData, mode) if err != nil { return err } @@ -237,6 +253,10 @@ func (s *GitDiffSystem) encodeDiff(absPath AbsPath, toData []byte, toMode fs.Fil fromMode = fromInfo.Mode() } + if s.reverse { + fromData, toData = toData, fromData + fromMode, toMode = toMode, fromMode + } diffPatch, err := DiffPatch(s.trimPrefix(absPath), fromData, fromMode, toData, toMode) if err != nil { return err diff --git a/internal/cmd/config.go b/internal/cmd/config.go index d30a6b4437e..4eebe19397b 100644 --- a/internal/cmd/config.go +++ b/internal/cmd/config.go @@ -1503,8 +1503,12 @@ func (c *Config) persistentPreRunRootE(cmd *cobra.Command, args []string) error c.destSystem = chezmoi.NewDryRunSystem(c.destSystem) } if c.verbose { - c.sourceSystem = chezmoi.NewGitDiffSystem(c.sourceSystem, c.stdout, c.SourceDirAbsPath, color) - c.destSystem = chezmoi.NewGitDiffSystem(c.destSystem, c.stdout, c.DestDirAbsPath, color) + c.sourceSystem = chezmoi.NewGitDiffSystem(c.sourceSystem, c.stdout, c.SourceDirAbsPath, &chezmoi.GitDiffSystemOptions{ + Color: color, + }) + c.destSystem = chezmoi.NewGitDiffSystem(c.destSystem, c.stdout, c.DestDirAbsPath, &chezmoi.GitDiffSystemOptions{ + Color: color, + }) } // Set up encryption. diff --git a/internal/cmd/diffcmd.go b/internal/cmd/diffcmd.go index d91d48daf56..cc2544dde5c 100644 --- a/internal/cmd/diffcmd.go +++ b/internal/cmd/diffcmd.go @@ -17,6 +17,7 @@ type diffCmdConfig struct { include *chezmoi.EntryTypeSet init bool recursive bool + reverse bool useBuiltinDiff bool } @@ -37,6 +38,7 @@ func (c *Config) newDiffCmd() *cobra.Command { flags.VarP(c.Diff.include, "include", "i", "Include entry types") flags.BoolVar(&c.Diff.init, "init", c.update.init, "Recreate config file from template") flags.BoolVarP(&c.Diff.recursive, "recursive", "r", c.Diff.recursive, "Recurse into subdirectories") + flags.BoolVar(&c.Diff.reverse, "reverse", c.Diff.reverse, "Reverse the direction of the diff") flags.StringVar(&c.Diff.Pager, "pager", c.Diff.Pager, "Set pager") flags.BoolVarP(&c.Diff.useBuiltinDiff, "use-builtin-diff", "", c.Diff.useBuiltinDiff, "Use the builtin diff") @@ -48,7 +50,10 @@ func (c *Config) runDiffCmd(cmd *cobra.Command, args []string) (err error) { dryRunSystem := chezmoi.NewDryRunSystem(c.destSystem) if c.Diff.useBuiltinDiff || c.Diff.Command == "" { color := c.Color.Value(c.colorAutoFunc) - gitDiffSystem := chezmoi.NewGitDiffSystem(dryRunSystem, &builder, c.DestDirAbsPath, color) + gitDiffSystem := chezmoi.NewGitDiffSystem(dryRunSystem, &builder, c.DestDirAbsPath, &chezmoi.GitDiffSystemOptions{ + Color: color, + Reverse: c.Diff.reverse, + }) if err = c.applyArgs(cmd.Context(), gitDiffSystem, c.DestDirAbsPath, args, applyArgsOptions{ include: c.Diff.include.Sub(c.Diff.Exclude), init: c.Diff.init, @@ -60,7 +65,9 @@ func (c *Config) runDiffCmd(cmd *cobra.Command, args []string) (err error) { err = c.pageOutputString(builder.String(), c.Diff.Pager) return } - diffSystem := chezmoi.NewExternalDiffSystem(dryRunSystem, c.Diff.Command, c.Diff.Args, c.DestDirAbsPath) + diffSystem := chezmoi.NewExternalDiffSystem(dryRunSystem, c.Diff.Command, c.Diff.Args, c.DestDirAbsPath, &chezmoi.ExternalDiffSystemOptions{ + Reverse: c.Diff.reverse, + }) defer func() { err = multierr.Append(err, diffSystem.Close()) }() diff --git a/internal/cmd/testdata/scripts/diff.txt b/internal/cmd/testdata/scripts/diff.txt index 96ff0d9f9f7..246cb64a18f 100644 --- a/internal/cmd/testdata/scripts/diff.txt +++ b/internal/cmd/testdata/scripts/diff.txt @@ -22,6 +22,13 @@ chezmoi diff [windows] cmp stdout golden/modify-file-diff-windows chezmoi apply --force $HOME${/}.file +# test chezmoi diff --reverse +edit $HOME/.file +chezmoi diff --reverse +[!windows] cmp stdout golden/modify-file-diff-reverse-unix +[windows] cmp stdout golden/modify-file-diff-reverse-windows +chezmoi apply --force $HOME${/}.file + # test that chezmoi diff generates a diff when a file is removed from the destination directory rm $HOME/.file chezmoi diff @@ -90,6 +97,22 @@ index 5d2730a8850a2db479af83de87cc8345437aef06..8a52cb9ce9551221716a53786ad74104 @@ -1,2 +1 @@ # contents of .file -# edited +-- golden/modify-file-diff-reverse-unix -- +diff --git a/.file b/.file +index 8a52cb9ce9551221716a53786ad74104c5902362..5d2730a8850a2db479af83de87cc8345437aef06 100644 +--- a/.file ++++ b/.file +@@ -1 +1,2 @@ + # contents of .file ++# edited +-- golden/modify-file-diff-reverse-windows -- +diff --git a/.file b/.file +index 8a52cb9ce9551221716a53786ad74104c5902362..5d2730a8850a2db479af83de87cc8345437aef06 100666 +--- a/.file ++++ b/.file +@@ -1 +1,2 @@ + # contents of .file ++# edited -- golden/restore-file-diff-unix -- diff --git a/.file b/.file new file mode 100644 diff --git a/internal/cmd/testdata/scripts/diff_unix.txt b/internal/cmd/testdata/scripts/diff_unix.txt index bbb328cdb49..cd35076d6cc 100644 --- a/internal/cmd/testdata/scripts/diff_unix.txt +++ b/internal/cmd/testdata/scripts/diff_unix.txt @@ -8,6 +8,10 @@ stdout ^${HOME@R}/\.file\s+${WORK@R}/.*/\.file$ chezmoi diff --use-builtin-diff cmp stdout golden/diff +# test that chezmoi diff --reverse reverses the order of arguments +chezmoi diff --reverse +stdout ^${WORK@R}/.*/\.file\s+${HOME@R}/\.file$ + chhome home2/user # test that chezmoi diff appends the destination and target paths if diff.args does not contain any templates
feat
Add --reverse option to diff command
9f207f4f92429377387177d07e2eb55dcbc5ded5
2022-08-30 01:51:57
Tom Payne
docs: Add summary paragraph
false
diff --git a/assets/chezmoi.io/docs/index.md b/assets/chezmoi.io/docs/index.md index 7b0452f6bc2..910f9282958 100644 --- a/assets/chezmoi.io/docs/index.md +++ b/assets/chezmoi.io/docs/index.md @@ -13,6 +13,12 @@ $ sh -c "$(curl -fsLS https://chezmoi.io/get)" -- init --apply $GITHUB_USERNAME As well as `curl | sh` installation, you can [install chezmoi with your favorite package manager](/install/). +chezmoi provides many features beyond symlinking dotfiles or using a bare git +repo including: dotfile templates (to handle small differences between +machines), password manager support (to store your secrets securely), importing +files from archives (great for shell and editor plugins), full file encryption +(using gpg or age), and running scripts (to handle everything else). + Updating your dotfiles on any machine is a single command: ```console
docs
Add summary paragraph
47c11e4dd4a7dc8d17428fc35618bf597341a2d4
2023-04-01 15:24:53
dependabot[bot]
chore(deps): bump github/codeql-action from 2.2.5 to 2.2.9
false
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 383435954bb..26878685ff2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,10 +47,10 @@ jobs: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c with: fetch-depth: 1 - - uses: github/codeql-action/init@32dc499307d133bb5085bae78498c0ac2cf762d5 + - uses: github/codeql-action/init@04df1262e6247151b5ac09cd2c303ac36ad3f62b with: languages: go - - uses: github/codeql-action/analyze@32dc499307d133bb5085bae78498c0ac2cf762d5 + - uses: github/codeql-action/analyze@04df1262e6247151b5ac09cd2c303ac36ad3f62b misspell: runs-on: ubuntu-22.04 steps:
chore
bump github/codeql-action from 2.2.5 to 2.2.9
3da497054f13c65f7131846bbc9715e5340165d1
2024-12-12 07:16:20
Tom Payne
chore: Update GitHub Actions
false
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 250dd156fe1..9b55a792d34 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -181,7 +181,7 @@ jobs: contents: read steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed + - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a with: go-version: oldstable - name: build
chore
Update GitHub Actions
1df112de705a5f23a6ae7c457fbdc994070b92d0
2022-05-01 15:35:35
dependabot[bot]
chore(deps): bump actions/setup-go from 2.2.0 to 3
false
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9c934930f4a..66e55e3a55e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -132,7 +132,7 @@ jobs: if: github.event_name == 'push' || needs.changes.outputs.code == 'true' runs-on: macos-11 steps: - - uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # pin@v2 + - uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # pin@v2 with: go-version: ${{ env.GO_VERSION }} - uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748 # pin@v3 @@ -185,7 +185,7 @@ jobs: needs: changes runs-on: ubuntu-18.04 steps: - - uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # pin@v2 + - uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # pin@v2 with: go-version: ${{ env.GO_VERSION }} - name: install-age @@ -283,7 +283,7 @@ jobs: if: github.event_name == 'push' || needs.changes.outputs.code == 'true' runs-on: ubuntu-18.04 steps: - - uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # pin@v2 + - uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # pin@v2 with: go-version: 1.17.x - uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748 # pin@v3 @@ -315,7 +315,7 @@ jobs: if: github.event_name == 'push' || needs.changes.outputs.code == 'true' runs-on: windows-2019 steps: - - uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # pin@v2 + - uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # pin@v2 with: go-version: ${{ env.GO_VERSION }} - uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748 # pin@v3 @@ -365,7 +365,7 @@ jobs: check: runs-on: ubuntu-18.04 steps: - - uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # pin@v2 + - uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # pin@v2 with: go-version: ${{ env.GO_VERSION }} - uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748 # pin@v3 @@ -394,7 +394,7 @@ jobs: if: github.event_name == 'push' || needs.changes.outputs.code == 'true' runs-on: ubuntu-18.04 steps: - - uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # pin@v2 + - uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # pin@v2 with: go-version: ${{ env.GO_VERSION }} - uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748 # pin@v3 @@ -425,7 +425,7 @@ jobs: run: | sudo apt-get update sudo apt-get -yq --no-install-suggests --no-install-recommends install musl-tools snapcraft - - uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # pin@v2 + - uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # pin@v2 with: go-version: ${{ env.GO_VERSION }} - uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748 # pin@v3
chore
bump actions/setup-go from 2.2.0 to 3
23a09fc0174557c87b9d708803d11377567eb580
2023-03-20 14:56:22
Austin Ziegler
chore: Deprecate `--autotemplate`
false
diff --git a/assets/chezmoi.io/docs/reference/commands/add.md b/assets/chezmoi.io/docs/reference/commands/add.md index 63ad2379ebb..c733cd93610 100644 --- a/assets/chezmoi.io/docs/reference/commands/add.md +++ b/assets/chezmoi.io/docs/reference/commands/add.md @@ -4,7 +4,7 @@ Add *target*s to the source state. If any target is already in the source state, then its source state is replaced with its current state in the destination directory. -## `--autotemplate` +## `--autotemplate` (deprecated) Automatically generate a template by replacing strings that match variable values from the `data` section of the config file with their respective config @@ -17,6 +17,9 @@ This implies the `--template` option. templates with unwanted variable substitutions. Carefully review any templates it generates. + `--autotemplate` has been deprecated and will be removed in a future + release of chezmoi. + ## `--encrypt` Encrypt files using the defined encryption method. diff --git a/pkg/cmd/addcmd.go b/pkg/cmd/addcmd.go index 5c27096d559..61d0a296434 100644 --- a/pkg/cmd/addcmd.go +++ b/pkg/cmd/addcmd.go @@ -53,6 +53,10 @@ func (c *Config) newAddCmd() *cobra.Command { flags.BoolVarP(&c.Add.template, "template", "T", c.Add.template, "Add files as templates") flags.BoolVar(&c.Add.TemplateSymlinks, "template-symlinks", c.Add.TemplateSymlinks, "Add symlinks with target in source or home dirs as templates") //nolint:lll + if err := flags.MarkDeprecated("autotemplate", "it will be removed in a future release"); err != nil { + panic(err) + } + registerExcludeIncludeFlagCompletionFuncs(addCmd) return addCmd diff --git a/pkg/cmd/testdata/scripts/addautotemplate.txtar b/pkg/cmd/testdata/scripts/addautotemplate.txtar index e7b477c42e8..5f5129f5e89 100644 --- a/pkg/cmd/testdata/scripts/addautotemplate.txtar +++ b/pkg/cmd/testdata/scripts/addautotemplate.txtar @@ -1,5 +1,6 @@ # test that chezmoi add --autotemplate on a file with a replacement creates a template in the source directory exec chezmoi add --autotemplate $HOME${/}.template +stderr 'deprecated' cmp $CHEZMOISOURCEDIR/dot_template.tmpl golden/dot_template.tmpl # test that chezmoi add --autotemplate on a symlink with a replacement creates a template in the source directory
chore
Deprecate `--autotemplate`
302a3b801ac79b5b5efa84f5e62d6ed9b232adb5
2024-02-15 07:44:24
Tom Payne
fix: Move documentation of --output flag to correct section
false
diff --git a/assets/chezmoi.io/docs/reference/command-line-flags/common.md b/assets/chezmoi.io/docs/reference/command-line-flags/common.md index 53fee2bf153..42f36164521 100644 --- a/assets/chezmoi.io/docs/reference/command-line-flags/common.md +++ b/assets/chezmoi.io/docs/reference/command-line-flags/common.md @@ -42,6 +42,10 @@ computing the target state. Prompt before applying each target. +## `-o`, `--output` *filename* + +Write the output to *filename* instead of stdout. + ## `-r`, `--recursive` Recurse into subdirectories, `true` by default. diff --git a/assets/chezmoi.io/docs/reference/command-line-flags/global.md b/assets/chezmoi.io/docs/reference/command-line-flags/global.md index b22007da29a..31c7a348a1d 100644 --- a/assets/chezmoi.io/docs/reference/command-line-flags/global.md +++ b/assets/chezmoi.io/docs/reference/command-line-flags/global.md @@ -56,10 +56,6 @@ Do not use the pager. Do not attempt to get a TTY for prompts. Instead, read them from stdin. -## `-o`, `--output` *filename* - -Write the output to *filename* instead of stdout. - ## `--persistent-state` *filename* > Configuration: `persistentState`
fix
Move documentation of --output flag to correct section
85983f06931e86b157a877287a82d8b6faca8eea
2024-01-16 13:43:25
Tom Payne
feat: Promote hooks to stable
false
diff --git a/assets/chezmoi.io/docs/reference/configuration-file/hooks.md b/assets/chezmoi.io/docs/reference/configuration-file/hooks.md index 57a9ee77d98..cc03d6112b9 100644 --- a/assets/chezmoi.io/docs/reference/configuration-file/hooks.md +++ b/assets/chezmoi.io/docs/reference/configuration-file/hooks.md @@ -4,12 +4,6 @@ Hook commands are executed before and after events. Unlike scripts, hooks are always run, even if `--dry-run` is specified. Hooks should be fast and idempotent. -!!! warning - - Hooks are an experimental feature that might change in the future. If you - use them then please [report how you are using - them](https://github.com/twpayne/chezmoi/discussions/3342). - The following events are defined: | Event | Trigger | diff --git a/assets/chezmoi.io/docs/user-guide/advanced/install-your-password-manager-on-init.md b/assets/chezmoi.io/docs/user-guide/advanced/install-your-password-manager-on-init.md index 9d9815f0600..0d11cf655b6 100644 --- a/assets/chezmoi.io/docs/user-guide/advanced/install-your-password-manager-on-init.md +++ b/assets/chezmoi.io/docs/user-guide/advanced/install-your-password-manager-on-init.md @@ -1,11 +1,5 @@ # Install your password manager on init -!!! warning - - The approach described here is experimental and may change in a future version - of chezmoi. If you use this, please contribute to [the - discussion](https://github.com/twpayne/chezmoi/discussions/3342). - If you use a password manager to store your secrets then you may need to install your password manager after you have run `chezmoi init` on a new machine but before `chezmoi init --apply` or `chezmoi apply` executes your `run_before_`
feat
Promote hooks to stable
c33f12d2853bababe24e7e57a2554e40f785915c
2021-12-13 06:10:51
Tom Payne
chore: Update dependencies
false
diff --git a/go.mod b/go.mod index 34bb6175822..0a40a5d641d 100644 --- a/go.mod +++ b/go.mod @@ -38,7 +38,7 @@ require ( github.com/shopspring/decimal v1.3.1 // indirect github.com/spf13/afero v1.6.0 github.com/spf13/cobra v1.2.1 - github.com/spf13/viper v1.9.0 + github.com/spf13/viper v1.10.0 github.com/stretchr/objx v0.3.0 // indirect github.com/stretchr/testify v1.7.0 github.com/twpayne/go-pinentry v0.0.2 diff --git a/go.sum b/go.sum index a716d906460..1a08b07b774 100644 --- a/go.sum +++ b/go.sum @@ -23,31 +23,48 @@ cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSU cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= +cloud.google.com/go v0.99.0 h1:y/cM2iqGgGi5D5DQZl6D9STN/3dR/Vx5Mp8s752oJTY= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0 h1:PQcPefKFdaIzjQFbiyOgAqyx8q5djaE7x9Sqe712DPA= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0 h1:/May9ojXjRkPBNVrq+oWLqmWCkr4OU5uRY29bu0mRyQ= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/firestore v1.6.0/go.mod h1:afJwI0vaXwAG54kI7A//lP/lSPDkQORQuMkv56TxEPU= +cloud.google.com/go/firestore v1.6.1 h1:8rBq3zRjnHx8UtBvaOWqBB1xq9jH6/wltfQLlTMh2Fw= +cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1 h1:ukjixP1wl0LpnZ6LWtZJ0mX5tBmjp1f8Sqer8Z2OMUU= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0 h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/age v1.0.0 h1:V6q14n0mqYU3qKFkZ6oOaF9oXneOviS3ubXsSVBRSzc= filippo.io/age v1.0.0/go.mod h1:PaX+Si/Sd5G8LgfCwldsSba3H1DDQZhIhFGkhbHaBq8= +filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= @@ -59,32 +76,55 @@ github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugX github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY= github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= github.com/ProtonMail/go-crypto v0.0.0-20211112122917-428f8eabeeb3 h1:XcF0cTDJeiuZ5NU8w7WUDge0HRwwNRmxj/GGk6KSA6g= github.com/ProtonMail/go-crypto v0.0.0-20211112122917-428f8eabeeb3/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= +github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= github.com/alecthomas/chroma v0.8.2/go.mod h1:sko8vR34/90zvl5QdcUdvzL3J8NKjAUx9va9jPuFNoM= github.com/alecthomas/chroma v0.9.4 h1:YL7sOAE3p8HS96T9km7RgvmsZIctqbK1qJ0b7hzed44= github.com/alecthomas/chroma v0.9.4/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= +github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 h1:JHZL0hZKJ1VENNfmXvHbgYlbUOvpzYzvy2aZU5gXVeo= github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= +github.com/alecthomas/kong v0.2.4 h1:Y0ZBCHAvHhTHw7FFJ2FzCAAG4pkbTgA45nc7BpMhDNk= github.com/alecthomas/kong v0.2.4/go.mod h1:kQOmtJgV+Lb4aj+I2LEn40cbtawdWJ9Y8QLq+lElKxE= +github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897 h1:p9Sln00KOTlrYkxI1zYWl1QLnEqAqEARBEYa8FQnQcY= github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 h1:Hs82Z41s6SdL1CELW+XaDYmOH4hkBN4/N9og/AsOv7E= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8Uo= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.4 h1:w/jqZtC9YD4DS/Vp9GhWfWcCpuAL58oTnLoI8vE9YHU= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/bmatcuk/doublestar/v4 v4.0.2 h1:X0krlUVAVmtr2cRoTqR8aDMrDqnB36ht8wpWTiQ3jsA= github.com/bmatcuk/doublestar/v4 v4.0.2/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= @@ -93,25 +133,51 @@ github.com/bradenhilton/cityhash v1.0.0/go.mod h1:Wmb8yW1egA9ulrsRX4mxfYx5zq4nBW github.com/bradenhilton/mozillainstallhash v1.0.0 h1:QL9byVGb4FrVOI7MubnME3uPNj5R78tqYQPlxuBmXMw= github.com/bradenhilton/mozillainstallhash v1.0.0/go.mod h1:yVD0OX1izZHYl1lBm2UDojyE/k0xIqKJK78k+tdWV+k= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0 h1:t/LhUZLVitR1Ow2YOnduCsavhwFUklBMoGVYUCqmCqk= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charmbracelet/glamour v0.3.0 h1:3H+ZrKlSg8s+WU6V7eF2eRVYt8lCueffbi7r2+ffGkc= github.com/charmbracelet/glamour v0.3.0/go.mod h1:TzF0koPZhqq0YVBNL100cPHznAAjVj7fksX2RInwjGw= +github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible h1:C29Ae4G5GtYyYMm1aztcyj/J5ckgJm2zwdDajFbx1NY= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 h1:hzAQntlaYRkVSFEfj9OTWlVV1H155FMD8BTKktLv0QI= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490 h1:KwaoQzs/WeUxxJqiJsZ4euOly1Az/IgZXXSxlD/UBNk= +github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -128,13 +194,22 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.1 h1:cgDRLG7bs59Zd+apAWuzLQL95obVYAymNJek76W3mgw= +github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.6.2 h1:JiO+kJTpmYGjEodY7O1Zk8oZcNz1+f30UtwtXoFUPzE= +github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= @@ -147,20 +222,36 @@ github.com/go-git/go-git-fixtures/v4 v4.2.1 h1:n9gGL1Ct/yIw+nfsfr8s4+sbhT+Ncu2Su github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.2.6-0.20210915003542-8b1f7f90f6b1 h1:4dntyT+x6QTOSCIrgczbQ+ockAEha0cfxD5Wi0iCzjY= github.com/go-ole/go-ole v1.2.6-0.20210915003542-8b1f7f90f6b1/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -169,6 +260,7 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -188,6 +280,7 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -210,12 +303,15 @@ github.com/google/go-github/v41 v41.0.0 h1:HseJrM2JFf2vfiZJ8anY2hqBjdfY1Vlj/K27u github.com/google/go-github/v41 v41.0.0/go.mod h1:XgmCA5H323A9rtgExdTcnDkcqp6S30AVACCBDOonIxg= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= +github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gops v0.3.22 h1:lyvhDxfPLHAOR2xIYwjPhN387qHxyU21Sk9sz/GhmhQ= github.com/google/gops v0.3.22/go.mod h1:7diIdLsqpCihPSX3fQagksT/Ku/y4RL9LHTlKyEUDl8= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -230,6 +326,7 @@ github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= @@ -242,45 +339,81 @@ github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1 h1:dp3bWCh+PPO1zjRRiCSczJav13sBvG4UhNyVTa1KqdU= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.11.0 h1:Hw/G8TtRvOElqxVIhBzXciiSTbapq8hZ2XKZsXk5ZCE= +github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.8.0 h1:OJtKBtEjboEZvG6AOUdh4Z1Zbyu0WcxQ0qatRrZHTVU= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.0.0 h1:bkKf0BeBXcSYa7f5Fyi9gMuQ8gNsxeiNpZjR6VxNZeo= +github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-retryablehttp v0.5.3 h1:QlWt0KvWT0lq8MFppF9tsJGF+ynG7ztc2KIPhzRGk7s= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= +github.com/hashicorp/mdns v1.0.4 h1:sY0CMhFmjIPDMlTB+HfymFHCaYLhgifZ0QhjaYKD/UQ= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.3.0 h1:8+567mCcFDnS5ADl7lrpxPMWiFCElyUEeW0gtj34fMA= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hashicorp/serf v0.9.6 h1:uuEX1kLR6aoda1TBttmJQKDLZE1Ob7KN0NPdE7EtCDc= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639 h1:mV02weKRL81bEnm8A0HT1/CAelMQDBuQIfLw8n+d6xI= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= @@ -290,29 +423,48 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0 h1:TDTW5Yz1mjftljbcKqRcrYhd4XeOoI98t+9HbQbYf7g= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kevinburke/ssh_config v1.1.0 h1:pH/t1WS9NzT8go394IqZeJTMHVm6Cr6ZJ6AQ+mdNo/o= github.com/kevinburke/ssh_config v1.1.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19 h1:WjT3fLi9n8YWh/Ih8Q1LHAPsTqGddPcHqscN+PJ3i68= github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19/go.mod h1:hY+WOq6m2FpbvyrI93sMaypsttvaIL5nhVR92dTMUcQ= +github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/lyft/protoc-gen-star v0.5.3 h1:zSGLzsUew8RT+ZKPHc3jnf8XLaVyHzTcAFBzHtCNR20= +github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= @@ -320,6 +472,9 @@ github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlW github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= @@ -333,12 +488,17 @@ github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRC github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/microcosm-cc/bluemonday v1.0.6/go.mod h1:HOT/6NaBlR0f9XlxD3zolN6Z3N8Lp4pvhp+jLS5ihnI= github.com/microcosm-cc/bluemonday v1.0.16 h1:kHmAq2t7WPWLjiGvzKa5o3HzSfahUKiOq7fAPUiMNIc= github.com/microcosm-cc/bluemonday v1.0.16/go.mod h1:Z0r70sCuXHig8YpBzCc5eGHAap2K7e/u082ZUpDRRqM= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/cli v1.1.0 h1:tEElEatulEHDeedTxwckzyYMA5c86fbmNIUL1hBIiTg= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= @@ -346,8 +506,11 @@ github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HK github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= @@ -359,8 +522,12 @@ github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/muesli/combinator v0.3.0 h1:SZDuRzzwmVPLkbOzbhGzBTwd5+Y6aFN4UusOW2azrNA= github.com/muesli/combinator v0.3.0/go.mod h1:ttPegJX0DPQaGDtJKMInIP6Vfp5pN8RX7QntFCcpy18= github.com/muesli/reflow v0.2.0/go.mod h1:qT22vjVmM9MIUeLgsVYe/Ye7eZlbv9dZjL3dVhUqLX8= @@ -369,10 +536,15 @@ github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKt github.com/muesli/termenv v0.8.1/go.mod h1:kzt/D/4a88RoheZmwfqorY3A+tnsSMA9HJC/fQSFKo0= github.com/muesli/termenv v0.9.0 h1:wnbOaGz+LUR3jNT0zOzinPnyDaCZUQRZj9GxK8eRVl8= github.com/muesli/termenv v0.9.0/go.mod h1:R/LzAKf+suGs4IsO95y7+7DpFHO0KABgnZqtlyx2mBw= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223 h1:F9x/1yl3T2AeKLr2AMdilSD8+f9bvMnNN8VS5iDtovc= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= @@ -380,42 +552,76 @@ github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+v github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.1 h1:VasscCm72135zRysgrJDKsntdmPN+OuU3+nnHYA9wyc= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.4.0 h1:YVIb/fVcOTMSqtqZWSKnHpSLBxu8DKgxq8z6RuBZwqI= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/rs/xid v1.3.0 h1:6NjYksEUlhurdVehpc7S7dk6DAmcKv8V9gG0FsVN2U4= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.26.0 h1:ORM4ibhEZeTeQlCojCK2kPz1ogAY4bGs4tD+SaAdGaE= github.com/rs/zerolog v1.26.0/go.mod h1:yBiM87lvSqX8h0Ww4sdzNSkVYZ8dL2xjZJG1lAuGZEo= +github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sagikazarmark/crypt v0.1.0/go.mod h1:B/mN0msZuINBtQ1zZLEQcegFJJf9vnYIR88KRMEuODE= +github.com/sagikazarmark/crypt v0.3.0 h1:TV5DVog+pihN4Rr0rN1IClv4ePpkzdg9sPrw7WDofZ8= +github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shirou/gopsutil/v3 v3.21.9 h1:Vn4MUz2uXhqLSiCbGFRc0DILbMVLAY92DSkT8bsYrHg= github.com/shirou/gopsutil/v3 v3.21.9/go.mod h1:YWp/H8Qs5fVmf17v7JNZzA0mPJ+mS2e9JdiUF9LlKzQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -430,6 +636,8 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/spf13/viper v1.9.0 h1:yR6EXjTp0y0cLN8OZg1CRZmOBdI88UcGkhgyJhu6nZk= github.com/spf13/viper v1.9.0/go.mod h1:+i6ajR7OX2XaiBkrcZJFK21htRk7eDeLg7+O6bhUPP4= +github.com/spf13/viper v1.10.0 h1:mXH0UwHS4D2HwWZa75im4xIQynLfblmWV7qcWpfv0yk= +github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As= @@ -443,8 +651,12 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= +github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twpayne/go-pinentry v0.0.2 h1:xncgnq3VGWgOq5gMx1SmK++7PrfvkvqZZY00SijBASs= github.com/twpayne/go-pinentry v0.0.2/go.mod h1:OUbsOnVXqvfSr8PZzFkSNJdBTJOPepfM0NSlDmR5paY= github.com/twpayne/go-shell v0.3.1 h1:JIC6cyDpG/p8mRnFUleH07roi90q0J9QC8PnvtmYLRo= @@ -458,6 +670,7 @@ github.com/twpayne/go-xdg/v6 v6.0.0/go.mod h1:XlfiGBU0iBxudVRWh+SXF+I1Cfb7rMq1IF github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xanzy/ssh-agent v0.3.1 h1:AmzO1SSWxw73zxFZPRwaMN1MohDw8UyHnmuxyceTEGo= github.com/xanzy/ssh-agent v0.3.1/go.mod h1:QIE4lCeL7nkC25x+yA3LBIYfwCc1TFziCtG7cBAac6w= +github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -475,15 +688,23 @@ github.com/zalando/go-keyring v0.1.1/go.mod h1:OIC+OZ28XbmwFxU/Rp9V7eKzZjamBJwRz go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.1 h1:v28cktvBq+7vGyJXF8G+rWJmj+1XUmMtqcLnH8hDocM= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.1 h1:XIQcHCFSG53bJETYeRJtIxdLv2EWRGxcfzR8lSnTH4E= +go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v2 v2.305.1 h1:vtxYCKWA9x31w0WJj7DdqsHFNjhkigdAnziDtkZb/l4= +go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= @@ -491,7 +712,9 @@ go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -517,8 +740,10 @@ golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -531,8 +756,10 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= @@ -543,9 +770,12 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0 h1:UG21uOlmZabA4fW5i7ZX6bjw1xELEGg/ZLgZq9auk/Q= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -554,6 +784,7 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -582,9 +813,11 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -604,6 +837,7 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -616,15 +850,18 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -664,6 +901,7 @@ golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -686,6 +924,11 @@ golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210902050250-f475640dd07b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486 h1:5hpz5aRr+W1erYCL5JRhSUBJRph7l9XkNveoExlrKYk= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -704,6 +947,7 @@ golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -761,6 +1005,7 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -794,7 +1039,13 @@ google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtuk google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.62.0 h1:PhGymJMXfGBzc4lBRmrx9+1w4w2wEzURHNGF/sD/xGc= +google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -855,6 +1106,18 @@ google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKr google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -880,6 +1143,10 @@ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.42.0 h1:XT2/MFpuPFsEX2fWh3YQtHkZ+WYZFQRfaUgLZYj/p6A= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -895,6 +1162,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -909,10 +1178,13 @@ gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0 h1:POO/ycCATvegFmVuPpQzZFJ+pGZeX22Ufu6fibxDVjU= gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -926,10 +1198,15 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM= howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= +rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/goversion v1.2.0 h1:SPn+NLTiAG7w30IRK/DKp1BjvpWabYgxlLp/+kx5J8w= rsc.io/goversion v1.2.0/go.mod h1:Eih9y/uIBS3ulggl7KNJ09xGSLcuNaLgmvvqa07sgfo= +rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
chore
Update dependencies
c6e083960a417ac3bc699cb1e3fe69ba34cd9380
2023-09-11 04:12:37
Tom Payne
chore: Update dependencies
false
diff --git a/assets/chezmoi.io/docs/reference/templates/github-functions/gitHubLatestRelease.md b/assets/chezmoi.io/docs/reference/templates/github-functions/gitHubLatestRelease.md index 2cecd4f0b22..dbc9a1b8e16 100644 --- a/assets/chezmoi.io/docs/reference/templates/github-functions/gitHubLatestRelease.md +++ b/assets/chezmoi.io/docs/reference/templates/github-functions/gitHubLatestRelease.md @@ -3,7 +3,7 @@ `gitHubLatestRelease` calls the GitHub API to retrieve the latest release about the given *owner-repo*, returning structured data as defined by the [GitHub Go API -bindings](https://pkg.go.dev/github.com/google/go-github/v54/github#RepositoryRelease). +bindings](https://pkg.go.dev/github.com/google/go-github/v55/github#RepositoryRelease). Calls to `gitHubLatestRelease` are cached so calling `gitHubLatestRelease` with the same *owner-repo* will only result in one call to the GitHub API. diff --git a/assets/chezmoi.io/docs/reference/templates/github-functions/gitHubLatestTag.md b/assets/chezmoi.io/docs/reference/templates/github-functions/gitHubLatestTag.md index e4f69b2f554..e6c695a153b 100644 --- a/assets/chezmoi.io/docs/reference/templates/github-functions/gitHubLatestTag.md +++ b/assets/chezmoi.io/docs/reference/templates/github-functions/gitHubLatestTag.md @@ -2,7 +2,7 @@ `gitHubLatestTag` calls the GitHub API to retrieve the latest tag for the given *owner-repo*, returning structured data as defined by the [GitHub Go API -bindings](https://pkg.go.dev/github.com/google/go-github/v54/github#RepositoryTag). +bindings](https://pkg.go.dev/github.com/google/go-github/v55/github#RepositoryTag). Calls to `gitHubLatestTag` are cached the same as [`githubTags`](/reference/templates/functions/gitHubTags.md), so calling diff --git a/assets/chezmoi.io/docs/reference/templates/github-functions/gitHubReleases.md b/assets/chezmoi.io/docs/reference/templates/github-functions/gitHubReleases.md index f93a3fd646b..3d348f83799 100644 --- a/assets/chezmoi.io/docs/reference/templates/github-functions/gitHubReleases.md +++ b/assets/chezmoi.io/docs/reference/templates/github-functions/gitHubReleases.md @@ -3,7 +3,7 @@ `gitHubReleases` calls the GitHub API to retrieve the first page of releases for the given *owner-repo*, returning structured data as defined by the [GitHub Go API -bindings](https://pkg.go.dev/github.com/google/go-github/v54/github#RepositoryRelease). +bindings](https://pkg.go.dev/github.com/google/go-github/v55/github#RepositoryRelease). Calls to `gitHubReleases` are cached so calling `gitHubReleases` with the same *owner-repo* will only result in one call to the GitHub API. diff --git a/assets/chezmoi.io/docs/reference/templates/github-functions/gitHubTags.md b/assets/chezmoi.io/docs/reference/templates/github-functions/gitHubTags.md index e40af0846f5..72066811240 100644 --- a/assets/chezmoi.io/docs/reference/templates/github-functions/gitHubTags.md +++ b/assets/chezmoi.io/docs/reference/templates/github-functions/gitHubTags.md @@ -3,7 +3,7 @@ `gitHubTags` calls the GitHub API to retrieve the first page of tags for the given *owner-repo*, returning structured data as defined by the [GitHub Go API -bindings](https://pkg.go.dev/github.com/google/go-github/v54/github#RepositoryTag). +bindings](https://pkg.go.dev/github.com/google/go-github/v55/github#RepositoryTag). Calls to `gitHubTags` are cached so calling `gitHubTags` with the same *owner-repo* will only result in one call to the GitHub API. diff --git a/go.mod b/go.mod index 4ad24dcc949..c1ab254cab4 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/Shopify/ejson v1.4.1 github.com/alecthomas/assert/v2 v2.3.0 github.com/aws/aws-sdk-go-v2 v1.21.0 - github.com/aws/aws-sdk-go-v2/config v1.18.38 + github.com/aws/aws-sdk-go-v2/config v1.18.39 github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.21.3 github.com/bmatcuk/doublestar/v4 v4.6.0 github.com/bradenhilton/mozillainstallhash v1.0.1 @@ -43,9 +43,9 @@ require ( github.com/withfig/autocomplete-tools/integrations/cobra v1.2.1 github.com/zalando/go-keyring v0.2.3 go.etcd.io/bbolt v1.3.7 - golang.org/x/crypto v0.12.0 - golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/oauth2 v0.11.0 + golang.org/x/crypto v0.13.0 + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 + golang.org/x/oauth2 v0.12.0 golang.org/x/sync v0.3.0 golang.org/x/sys v0.12.0 golang.org/x/term v0.12.0 @@ -57,7 +57,7 @@ require ( require ( dario.cat/mergo v1.0.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.2.0 // indirect @@ -70,14 +70,14 @@ require ( github.com/alecthomas/repr v0.2.0 // indirect github.com/alessio/shellescape v1.4.2 // indirect github.com/atotto/clipboard v0.1.4 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.36 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.37 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 // indirect github.com/aws/smithy-go v1.14.2 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect @@ -132,10 +132,10 @@ require ( github.com/yuin/goldmark v1.5.6 // indirect github.com/yuin/goldmark-emoji v1.0.2 // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.14.0 // indirect + golang.org/x/net v0.15.0 // indirect golang.org/x/text v0.13.0 // indirect - golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect - google.golang.org/appengine v1.6.7 // indirect + golang.org/x/tools v0.13.0 // indirect + google.golang.org/appengine v1.6.8 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect ) diff --git a/go.sum b/go.sum index 0c57da155a2..34699ca085e 100644 --- a/go.sum +++ b/go.sum @@ -8,8 +8,8 @@ filippo.io/age v1.1.1 h1:pIpO7l151hCnQ4BdyBujnGP2YlUo0uj6sAVNHGBvXHg= filippo.io/age v1.1.1/go.mod h1:l03SrzDUrBkdBx8+IILdnn2KZysqQdbEBUQ4p3sqEQE= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 h1:/iHxaJhsFr0+xVFfbMr5vxz848jyiWuIEDhYq3y5odY= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 h1:t5+QXLCK9SVi0PPdaY0PrFvYUo24KwA0QwxnaHRSVd4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 h1:LNHhpdK7hzUcx/k1LIcuh5k7k1LGIWLQfCjaneSj7Fc= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1/go.mod h1:uE9zaUfEQT/nbQjVi2IblCG9iaLtZsuYZ8ne+PuQ02M= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= @@ -52,10 +52,10 @@ github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= -github.com/aws/aws-sdk-go-v2/config v1.18.38 h1:CByQCELMgm2tM1lAehx3XNg0R/pfeXsYzqn0Aq2chJQ= -github.com/aws/aws-sdk-go-v2/config v1.18.38/go.mod h1:vNm9Hf5VgG2fSUWhT3zFrqN/RosGcabFMYgiSoxKFU8= -github.com/aws/aws-sdk-go-v2/credentials v1.13.36 h1:ps0cPswZjpsOk6sLwG6fdXTzrYjCplgPEyG3OUbbdqE= -github.com/aws/aws-sdk-go-v2/credentials v1.13.36/go.mod h1:sY2phUzxbygoyDtTXhqi7GjGjCQ1S5a5Rj8u3ksBxCg= +github.com/aws/aws-sdk-go-v2/config v1.18.39 h1:oPVyh6fuu/u4OiW4qcuQyEtk7U7uuNBmHmJSLg1AJsQ= +github.com/aws/aws-sdk-go-v2/config v1.18.39/go.mod h1:+NH/ZigdPckFpgB1TRcRuWCB/Kbbvkxc/iNAKTq5RhE= +github.com/aws/aws-sdk-go-v2/credentials v1.13.37 h1:BvEdm09+ZEh2XtN+PVHPcYwKY3wIeB6pw7vPRM4M9/U= +github.com/aws/aws-sdk-go-v2/credentials v1.13.37/go.mod h1:ACLrdkd4CLZyXOghZ8IYumQbcooAcp2jo/s2xsFH8IM= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= @@ -70,8 +70,8 @@ github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.21.3 h1:H6ZipEknzu7RkJW3w github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.21.3/go.mod h1:5W2cYXDPabUmwULErlC92ffLhtTuyv4ai+5HhdbhfNo= github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 h1:2PylFCfKCEDv6PeSN09pC/VUiRd10wi1VfHG5FrW0/g= github.com/aws/aws-sdk-go-v2/service/sso v1.13.6/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5 h1:dnInJb4S0oy8aQuri1mV6ipLlnZPfnsDNB9BGO9PDNY= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 h1:pSB560BbVj9ZlJZF4WYj5zsytWHWKxg+NgyGV4B2L58= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 h1:CQBFElb0LS8RojMJlxRSo/HXipvTZW2S44Lt9Mk2aYQ= github.com/aws/aws-sdk-go-v2/service/sts v1.21.5/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= @@ -154,8 +154,8 @@ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -368,15 +368,14 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= -golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= -golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -385,10 +384,10 @@ golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= -golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= -golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= +golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -424,10 +423,10 @@ golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= @@ -437,13 +436,13 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 h1:Vve/L0v7CXXuxUmaMGIEK/dEeq7uiqb5qBgQrZzIE7E= -golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
chore
Update dependencies
5b6b66c91271eec55bb344a3af55c5573c1a58fc
2024-02-25 01:58:09
Tom Payne
chore: Update dependencies
false
diff --git a/go.mod b/go.mod index 2144a8ef640..68aa4a1fc29 100644 --- a/go.mod +++ b/go.mod @@ -5,14 +5,14 @@ go 1.21 require ( filippo.io/age v1.1.1 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 - github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.0.1 + github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.1.0 github.com/Masterminds/sprig/v3 v3.2.3 github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 github.com/Shopify/ejson v1.4.1 - github.com/alecthomas/assert/v2 v2.5.0 - github.com/aws/aws-sdk-go-v2 v1.24.1 - github.com/aws/aws-sdk-go-v2/config v1.26.6 - github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.26.2 + github.com/alecthomas/assert/v2 v2.6.0 + github.com/aws/aws-sdk-go-v2 v1.25.2 + github.com/aws/aws-sdk-go-v2/config v1.27.4 + github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.28.1 github.com/bmatcuk/doublestar/v4 v4.6.1 github.com/bradenhilton/mozillainstallhash v1.0.1 github.com/charmbracelet/bubbles v0.18.0 @@ -25,7 +25,7 @@ require ( github.com/google/renameio/v2 v2.0.0 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/itchyny/gojq v0.12.14 - github.com/klauspost/compress v1.17.6 + github.com/klauspost/compress v1.17.7 github.com/mitchellh/copystructure v1.2.0 github.com/mitchellh/mapstructure v1.5.0 github.com/muesli/combinator v0.3.0 @@ -38,13 +38,13 @@ require ( github.com/tailscale/hujson v0.0.0-20221223112325-20486734a56a github.com/twpayne/go-pinentry/v3 v3.0.1 github.com/twpayne/go-shell v0.4.0 - github.com/twpayne/go-vfs/v5 v5.0.1 + github.com/twpayne/go-vfs/v5 v5.0.2 github.com/twpayne/go-xdg/v6 v6.1.2 github.com/ulikunitz/xz v0.5.11 github.com/withfig/autocomplete-tools/integrations/cobra v1.2.1 github.com/zalando/go-keyring v0.2.3 github.com/zricethezav/gitleaks/v8 v8.18.2 - go.etcd.io/bbolt v1.3.8 + go.etcd.io/bbolt v1.3.9 golang.org/x/crypto v0.19.0 golang.org/x/oauth2 v0.17.0 golang.org/x/sync v0.6.0 @@ -61,27 +61,27 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect github.com/BobuSumisu/aho-corasick v1.0.3 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ProtonMail/go-crypto v1.0.0 // indirect github.com/alecthomas/chroma v0.10.0 // indirect - github.com/alecthomas/repr v0.3.0 // indirect + github.com/alecthomas/repr v0.4.0 // indirect github.com/alessio/shellescape v1.4.2 // indirect github.com/atotto/clipboard v0.1.4 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.16.16 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.18.7 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.7 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.26.7 // indirect - github.com/aws/smithy-go v1.19.0 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.4 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.28.1 // indirect + github.com/aws/smithy-go v1.20.1 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/aymerick/douceur v0.2.0 // indirect github.com/bradenhilton/cityhash v1.0.0 // indirect @@ -92,7 +92,7 @@ require ( github.com/creack/pty/v2 v2.0.0-20231209135443-03db72c7b76c // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/danieljoos/wincred v1.2.1 // indirect - github.com/dlclark/regexp2 v1.10.0 // indirect + github.com/dlclark/regexp2 v1.11.0 // indirect github.com/dustin/gojson v0.0.0-20160307161227-2e71ec9dd5ad // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/fatih/semgroup v1.2.0 // indirect @@ -147,11 +147,11 @@ require ( github.com/yuin/goldmark v1.7.0 // indirect github.com/yuin/goldmark-emoji v1.0.2 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 // indirect + golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect golang.org/x/net v0.21.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.17.0 // indirect + golang.org/x/tools v0.18.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/protobuf v1.32.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect diff --git a/go.sum b/go.sum index ef958cc7311..b316c60fd55 100644 --- a/go.sum +++ b/go.sum @@ -24,12 +24,12 @@ github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+ github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo= github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= -github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.0.1 h1:8TkzQBrN9PWIwo7ekdd696KpC6IfTltV2/F8qKKBWik= -github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.0.1/go.mod h1:aprFpXPQiTyG5Rkz6Ot5pvU6y6YKg/AKYOcLCoxN0bk= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.1.0 h1:h4Zxgmi9oyZL2l8jeg1iRTqPloHktywWcu0nlJmo1tA= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.1.0/go.mod h1:LgLGXawqSreJz135Elog0ywTJDsm0Hz2k+N+6ZK35u8= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 h1:D3occbWoio4EBLkbkevetNMAVX197GkzbUMtqjGWn80= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0/go.mod h1:bTSOgj05NGRuHHhQwAdPnYr9TOdNmKlZTgGLL6nyAdI= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BobuSumisu/aho-corasick v1.0.3 h1:uuf+JHwU9CHP2Vx+wAy6jcksJThhJS9ehR8a+4nPE9g= github.com/BobuSumisu/aho-corasick v1.0.3/go.mod h1:hm4jLcvZKI2vRF2WDU1N4p/jpWtpOzp3nLmi9AzX/XE= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= @@ -46,12 +46,12 @@ github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0k github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/Shopify/ejson v1.4.1 h1:zGGojGJNTdIWza/kOT8gd2HKCg3ZkSi3CZ1ZX70NHsw= github.com/Shopify/ejson v1.4.1/go.mod h1:VZMUtDzvBW/PAXRUF5fzp1ffb1ucT8MztrZXXLYZurw= -github.com/alecthomas/assert/v2 v2.5.0 h1:OJKYg53BQx06/bMRBSPDCO49CbCDNiUQXwdoNrt6x5w= -github.com/alecthomas/assert/v2 v2.5.0/go.mod h1:fw5suVxB+wfYJ3291t0hRTqtGzFYdSwstnRQdaQx2DM= +github.com/alecthomas/assert/v2 v2.6.0 h1:o3WJwILtexrEUk3cUVal3oiQY2tfgr/FHWiz/v2n4FU= +github.com/alecthomas/assert/v2 v2.6.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= -github.com/alecthomas/repr v0.3.0 h1:NeYzUPfjjlqHY4KtzgKJiWd6sVq2eNUPTi34PiFGjY8= -github.com/alecthomas/repr v0.3.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= +github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= @@ -62,34 +62,34 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= -github.com/aws/aws-sdk-go-v2 v1.24.1 h1:xAojnj+ktS95YZlDf0zxWBkbFtymPeDP+rvUQIH3uAU= -github.com/aws/aws-sdk-go-v2 v1.24.1/go.mod h1:LNh45Br1YAkEKaAqvmE1m8FUx6a5b/V0oAKV7of29b4= -github.com/aws/aws-sdk-go-v2/config v1.26.6 h1:Z/7w9bUqlRI0FFQpetVuFYEsjzE3h7fpU6HuGmfPL/o= -github.com/aws/aws-sdk-go-v2/config v1.26.6/go.mod h1:uKU6cnDmYCvJ+pxO9S4cWDb2yWWIH5hra+32hVh1MI4= -github.com/aws/aws-sdk-go-v2/credentials v1.16.16 h1:8q6Rliyv0aUFAVtzaldUEcS+T5gbadPbWdV1WcAddK8= -github.com/aws/aws-sdk-go-v2/credentials v1.16.16/go.mod h1:UHVZrdUsv63hPXFo1H7c5fEneoVo9UXiz36QG1GEPi0= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 h1:c5I5iH+DZcH3xOIMlz3/tCKJDaHFwYEmxvlh2fAcFo8= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11/go.mod h1:cRrYDYAMUohBJUtUnOhydaMHtiK/1NZ0Otc9lIb6O0Y= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 h1:vF+Zgd9s+H4vOXd5BMaPWykta2a6Ih0AKLq/X6NYKn4= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10/go.mod h1:6BkRjejp/GR4411UGqkX8+wFMbFbqsUIimfK4XjOKR4= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 h1:nYPe006ktcqUji8S2mqXf9c/7NdiKriOwMvWQHgYztw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10/go.mod h1:6UV4SZkVvmODfXKql4LCbaZUpF7HO2BX38FgBf9ZOLw= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3 h1:n3GDfwqF2tzEkXlv5cuy4iy7LpKDtqDMcNLfZDu9rls= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 h1:/b31bi3YVNlkzkBrm9LfpaKoaYZUxIAj4sHfOTmLfqw= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4/go.mod h1:2aGXHFmbInwgP9ZfpmdIfOELL79zhdNYNmReK8qDfdQ= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10 h1:DBYTXwIGQSGs9w4jKm60F5dmCQ3EEruxdc0MFh+3EY4= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10/go.mod h1:wohMUQiFdzo0NtxbBg0mSRGZ4vL3n0dKjLTINdcIino= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.26.2 h1:A5sGOT/mukuU+4At1vkSIWAN8tPwPCoYZBp7aruR540= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.26.2/go.mod h1:qutL00aW8GSo2D0I6UEOqMvRS3ZyuBrOC1BLe5D2jPc= -github.com/aws/aws-sdk-go-v2/service/sso v1.18.7 h1:eajuO3nykDPdYicLlP3AGgOyVN3MOlFmZv7WGTuJPow= -github.com/aws/aws-sdk-go-v2/service/sso v1.18.7/go.mod h1:+mJNDdF+qiUlNKNC3fxn74WWNN+sOiGOEImje+3ScPM= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.7 h1:QPMJf+Jw8E1l7zqhZmMlFw6w1NmfkfiSK8mS4zOx3BA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.7/go.mod h1:ykf3COxYI0UJmxcfcxcVuz7b6uADi1FkiUz6Eb7AgM8= -github.com/aws/aws-sdk-go-v2/service/sts v1.26.7 h1:NzO4Vrau795RkUdSHKEwiR01FaGzGOH1EETJ+5QHnm0= -github.com/aws/aws-sdk-go-v2/service/sts v1.26.7/go.mod h1:6h2YuIoxaMSCFf5fi1EgZAwdfkGMgDY+DVfa61uLe4U= -github.com/aws/smithy-go v1.19.0 h1:KWFKQV80DpP3vJrrA9sVAHQ5gc2z8i4EzrLhLlWXcBM= -github.com/aws/smithy-go v1.19.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/aws/aws-sdk-go-v2 v1.25.2 h1:/uiG1avJRgLGiQM9X3qJM8+Qa6KRGK5rRPuXE0HUM+w= +github.com/aws/aws-sdk-go-v2 v1.25.2/go.mod h1:Evoc5AsmtveRt1komDwIsjHFyrP5tDuF1D1U+6z6pNo= +github.com/aws/aws-sdk-go-v2/config v1.27.4 h1:AhfWb5ZwimdsYTgP7Od8E9L1u4sKmDW2ZVeLcf2O42M= +github.com/aws/aws-sdk-go-v2/config v1.27.4/go.mod h1:zq2FFXK3A416kiukwpsd+rD4ny6JC7QSkp4QdN1Mp2g= +github.com/aws/aws-sdk-go-v2/credentials v1.17.4 h1:h5Vztbd8qLppiPwX+y0Q6WiwMZgpd9keKe2EAENgAuI= +github.com/aws/aws-sdk-go-v2/credentials v1.17.4/go.mod h1:+30tpwrkOgvkJL1rUZuRLoxcJwtI/OkeBLYnHxJtVe0= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2 h1:AK0J8iYBFeUk2Ax7O8YpLtFsfhdOByh2QIkHmigpRYk= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2/go.mod h1:iRlGzMix0SExQEviAyptRWRGdYNo3+ufW/lCzvKVTUc= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 h1:bNo4LagzUKbjdxE0tIcR9pMzLR2U/Tgie1Hq1HQ3iH8= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2/go.mod h1:wRQv0nN6v9wDXuWThpovGQjqF1HFdcgWjporw14lS8k= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2 h1:EtOU5jsPdIQNP+6Q2C5e3d65NKT1PeCiQk+9OdzO12Q= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2/go.mod h1:tyF5sKccmDz0Bv4NrstEr+/9YkSPJHrcO7UsUKf7pWM= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 h1:EyBZibRTVAs6ECHZOw5/wlylS9OcTzwyjeQMudmREjE= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1/go.mod h1:JKpmtYhhPs7D97NL/ltqz7yCkERFW5dOlHyVl66ZYF8= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2 h1:5ffmXjPtwRExp1zc7gENLgCPyHFbhEPwVTkTiH9niSk= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2/go.mod h1:Ru7vg1iQ7cR4i7SZ/JTLYN9kaXtbL69UdgG0OQWQxW0= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.28.1 h1:DtKw4TxZT3VrzYupXQJPBqT9ImyobZZE+JIQPPAVxqs= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.28.1/go.mod h1:bit9G2ORpSjUTr4PA4usvbBfbOyvMj0LbE1dXF14Sug= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.1 h1:utEGkfdQ4L6YW/ietH7111ZYglLJvS+sLriHJ1NBJEQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.1/go.mod h1:RsYqzYr2F2oPDdpy+PdhephuZxTfjHQe7SOBcZGoAU8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1 h1:9/GylMS45hGGFCcMrUZDVayQE1jYSIN6da9jo7RAYIw= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1/go.mod h1:YjAPFn4kGFqKC54VsHs5fn5B6d+PCY2tziEa3U/GB5Y= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.1 h1:3I2cBEYgKhrWlwyZgfpSO2BpaMY1LHPqXYk/QGlu2ew= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.1/go.mod h1:uQ7YYKZt3adCRrdCBREm1CD3efFLOUNH77MrUCvx5oA= +github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw= +github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/aymanbagabas/go-osc52 v1.0.3 h1:DTwqENW7X9arYimJrPeGZcV0ln14sGMt3pHZspWD+Mg= github.com/aymanbagabas/go-osc52 v1.0.3/go.mod h1:zT8H+Rk4VSabYN90pWyugflM3ZhpTZNC7cASDfUCdT4= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= @@ -138,8 +138,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/dlclark/regexp2 v1.10.0 h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq0= -github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI= +github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= @@ -259,8 +259,8 @@ github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7 github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI= -github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -429,8 +429,8 @@ github.com/twpayne/go-shell v0.4.0 h1:RAAMbjEj7mcwDdwC7SiFHGUKR+WDAURU6mnyd3r2p2 github.com/twpayne/go-shell v0.4.0/go.mod h1:MP3aUA0TQ3IGoJc15ahjb+7A7wZH4NeGrvLZ/aFQsHc= github.com/twpayne/go-vfs/v4 v4.3.0 h1:rTqFzzOQ/6ESKTSiwVubHlCBedJDOhQyVSnw8rQNZhU= github.com/twpayne/go-vfs/v4 v4.3.0/go.mod h1:tq2UVhnUepesc0lSnPJH/jQ8HruGhzwZe2r5kDFpEIw= -github.com/twpayne/go-vfs/v5 v5.0.1 h1:5g2H6D/r4BlukZn21ysaPqracmsNb2lRCoiJt55tjqk= -github.com/twpayne/go-vfs/v5 v5.0.1/go.mod h1:x4tZII+nP25/KlZ2lTPXxnTiS1ZSE10yNJ/mGiBoR8s= +github.com/twpayne/go-vfs/v5 v5.0.2 h1:5y6tVvQ5lPltcRauIRmX9qC/XYvV++DSRGZxUaiHzMQ= +github.com/twpayne/go-vfs/v5 v5.0.2/go.mod h1:zTPFJUbgsEMFNSWnWQlLq9wh4AN83edZzx3VXbxrS1w= github.com/twpayne/go-xdg/v6 v6.1.2 h1:KbfCsAP4bBR5+dzfTIh/M9onOPCSqlYsIER79IKwt+s= github.com/twpayne/go-xdg/v6 v6.1.2/go.mod h1:BFHclQaEPLq3jRRYjf1PdFzUEvAfPeLjNymIO/7/7o4= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= @@ -454,8 +454,8 @@ github.com/zalando/go-keyring v0.2.3 h1:v9CUu9phlABObO4LPWycf+zwMG7nlbb3t/B5wa97 github.com/zalando/go-keyring v0.2.3/go.mod h1:HL4k+OXQfJUWaMnqyuSOc0drfGPX2b51Du6K+MRgZMk= github.com/zricethezav/gitleaks/v8 v8.18.2 h1:slo/sMmgs3qA+6Vv6iqVhsCv+gsl3RekQXqDN0M4g5M= github.com/zricethezav/gitleaks/v8 v8.18.2/go.mod h1:8F5GrdCpEtyN5R+0MKPubbOPqIHptNckH3F7bYrhT+Y= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= +go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= @@ -482,8 +482,8 @@ golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2Uz golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= -golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= -golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= @@ -526,6 +526,8 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/telemetry v0.0.0-20240208230135-b75ee8823808 h1:+Kc94D8UVEVxJnLXp/+FMfqQARZtWHfVrcRtcG8aT3g= +golang.org/x/telemetry v0.0.0-20240208230135-b75ee8823808/go.mod h1:KG1lNk5ZFNssSZLrpVb4sMXKMpGwGXOxSG3rnu2gZQQ= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= @@ -549,8 +551,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= -golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= +golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk=
chore
Update dependencies
31485fab719512db98a524b0e2f65e48e400dd30
2024-11-08 21:19:12
Ruslan Sayfutdinov
chore: Delete pull request caches on close
false
diff --git a/.github/workflows/clear-pr-caches.yml b/.github/workflows/clear-pr-caches.yml new file mode 100644 index 00000000000..5011f9f9790 --- /dev/null +++ b/.github/workflows/clear-pr-caches.yml @@ -0,0 +1,12 @@ +on: + pull_request: + types: [ closed ] + +jobs: + clear-caches: + runs-on: ubuntu-22.04 + steps: + - name: clear-caches + uses: theAngularGuy/clear-cache-of-pull-request@60c83956d63c7b3745d6cde10d711aa0e50c2501 + with: + github-token: ${{ secrets.GITHUB_TOKEN }}
chore
Delete pull request caches on close
31298866a40232817edb348453ecc697c0f817dd
2022-01-17 00:45:00
Tom Payne
feat: Switch to Material for MkDocs for website
false
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 00000000000..f32a83a0500 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,3 @@ +# Contributing + +See https://chezmoi.io/developer/contributing-changes/. diff --git a/.github/ISSUE_TEMPLATE/01_support_request.md b/.github/ISSUE_TEMPLATE/01_support_request.md index 87a88b2cfdd..81d0260d890 100644 --- a/.github/ISSUE_TEMPLATE/01_support_request.md +++ b/.github/ISSUE_TEMPLATE/01_support_request.md @@ -4,7 +4,6 @@ about: Get help with using chezmoi title: '' labels: support assignees: '' - --- ## What exactly are you trying to do? @@ -17,9 +16,8 @@ Describe what you have tried so far. ## Where else have you checked for solutions? -* [ ] I have read [chezmoi's how-to guide](https://github.com/twpayne/chezmoi/blob/master/docs/HOWTO.md), and not found the answer. -* [ ] I have read [chezmoi's FAQ](https://github.com/twpayne/chezmoi/blob/master/docs/FAQ.md), and not found the answer. -* [ ] I have searched [chezmoi's reference guide](https://github.com/twpayne/chezmoi/blob/master/docs/REFERENCE.md), and not found the answer. +* [ ] I have read [chezmoi's user guide](https://chezmoi.io/user-guide/), and not found the answer. +* [ ] I have searched [chezmoi's reference guide](https://chezmoi.io/reference/), and not found the answer. * [ ] Other, please give details. ## Output of any commands you've tried with `--verbose` flag @@ -30,10 +28,14 @@ $ chezmoi --verbose <your-command> ## Output of `chezmoi doctor` +<details> + ```console $ chezmoi doctor ``` +</details> + ## Additional context Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/02_feature_request.md b/.github/ISSUE_TEMPLATE/02_feature_request.md index e7308ec8eb7..05a5e2bb4e5 100644 --- a/.github/ISSUE_TEMPLATE/02_feature_request.md +++ b/.github/ISSUE_TEMPLATE/02_feature_request.md @@ -4,7 +4,6 @@ about: Request a new feature title: '' labels: enhancement assignees: '' - --- ## Is your feature request related to a problem? Please describe. diff --git a/.github/ISSUE_TEMPLATE/03_bug_report.md b/.github/ISSUE_TEMPLATE/03_bug_report.md index b4b9978fd04..a0491400d6b 100644 --- a/.github/ISSUE_TEMPLATE/03_bug_report.md +++ b/.github/ISSUE_TEMPLATE/03_bug_report.md @@ -3,7 +3,6 @@ name: Bug report about: Report a bug title: '' assignees: '' - --- ## Describe the bug diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index aa0cc50d85f..bc753b26936 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -3,6 +3,6 @@ Thanks for contributing! Please make sure that you have followed the contributing guide: -https://github.com/twpayne/chezmoi/blob/master/docs/CONTRIBUTING.md +https://chezmoi.io/developer/contributing-changes/ --> diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 00000000000..089bc5b5729 --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,3 @@ +# Security + +See https://chezmoi.io/developer/security/. diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 18a3a5e770a..dade3595680 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,12 +6,6 @@ updates: interval: monthly labels: - enhancement - - package-ecosystem: gitsubmodule - directory: / - schedule: - interval: monthly - labels: - - enhancement - package-ecosystem: github-actions directory: / schedule: diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index faac9d15ca3..00000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "assets/chezmoi.io/themes/book"] - path = assets/chezmoi.io/themes/book - url = https://github.com/alex-shpak/hugo-book diff --git a/.goreleaser.yaml b/.goreleaser.yaml index ea728748c73..476578a7edb 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -77,7 +77,6 @@ archives: - LICENSE - README.md - completions/* - - docs/* replacements: 386: i386 format_overrides: @@ -90,7 +89,6 @@ archives: - LICENSE - README.md - completions/* - - docs/* name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}-glibc_{{ .Arch }}" - id: musl builds: @@ -99,7 +97,6 @@ archives: - LICENSE - README.md - completions/* - - docs/* name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}-musl_{{ .Arch }}" changelog: diff --git a/README.md b/README.md index 548c8f70ad6..89a9b17ae94 100644 --- a/README.md +++ b/README.md @@ -4,174 +4,8 @@ Manage your dotfiles across multiple diverse machines, securely. -With chezmoi, you can install chezmoi and your dotfiles on a new, empty machine -with a single command: - -```console -$ sh -c "$(curl -fsLS chezmoi.io/get)" -- init --apply <github-username> -``` - -Updating your dotfiles on any machine is a single command: - -```console -$ chezmoi update -``` - ---- - -* [How do I start with chezmoi now?](#how-do-i-start-with-chezmoi-now) -* [What does chezmoi do and why should I use it?](#what-does-chezmoi-do-and-why-should-i-use-it) -* [What are chezmoi's key features?](#what-are-chezmois-key-features) - * [Flexible](#flexible) - * [Personal and secure](#personal-and-secure) - * [Transparent](#transparent) - * [Declarative and robust](#declarative-and-robust) - * [Fast and easy to use](#fast-and-easy-to-use) -* [I already have a system to manage my dotfiles, why should I use chezmoi?](#i-already-have-a-system-to-manage-my-dotfiles-why-should-i-use-chezmoi) -* [How do people use chezmoi?](#how-do-people-use-chezmoi) - * [Dotfile repos using chezmoi](#dotfile-repos-using-chezmoi) - * [People talking about chezmoi](#people-talking-about-chezmoi) -* [What documentation is available?](#what-documentation-is-available) -* [License](#license) - ---- -## How do I start with chezmoi now? - -[Install chezmoi](docs/INSTALL.md) then read the [quick start -guide](docs/QUICKSTART.md). The [how-to guide](docs/HOWTO.md) covers most common -tasks, and there's both documentation on [templating](docs/TEMPLATING.md) and -[frequently asked questions](docs/FAQ.md) for specific questions. You can browse -other people's [dotfiles that use chezmoi on -GitHub](https://github.com/topics/chezmoi?o=desc&s=updated) and [dotfiles that -use chezmoi on GitLab](https://gitlab.com/explore/projects?topic=chezmoi), and -see how chezmoi [compares to other dotfile managers](docs/COMPARISON.md). For a -full description of chezmoi, consult the [reference](docs/REFERENCE.md). - ---- -## What does chezmoi do and why should I use it? - -chezmoi helps you manage your personal configuration files (dotfiles, like -`~/.gitconfig`) across multiple machines. - -chezmoi is helpful if you have spent time customizing the tools you use (e.g. -shells, editors, and version control systems) and want to keep machines running -different accounts (e.g. home and work) and/or different operating systems (e.g. -Linux, macOS, and Windows) in sync, while still being able to easily cope with -differences from machine to machine. - -chezmoi scales from the trivial (e.g. copying a few dotfiles onto a Raspberry -Pi, development container, or virtual machine) to complex long-lived -multi-machine development environments (e.g. keeping any number of home and -work, Linux, macOS, and Windows machines in sync). In all cases you only need to -maintain a single source of truth (a single branch in git) and getting started -only requires adding a single binary to your machine (which you can do with -`curl`, `wget`, or `scp`). - -chezmoi has strong support for security, allowing you to manage secrets (e.g. -passwords, access tokens, and private keys) securely and seamlessly using a -password manager and/or encrypt whole files with your favorite encryption tool. - -If you do not personalize your configuration or only ever use a single operating -system with a single account and none of your dotfiles contain secrets then you -don't need chezmoi. Otherwise, read on... - ---- - -## What are chezmoi's key features? - -### Flexible - -You can share as much configuration across machines as you want, while still -being able to control machine-specific details. Your dotfiles can be templates -(using [`text/template`](https://pkg.go.dev/text/template) syntax). Predefined -variables allow you to change behavior depending on operating system, -architecture, and hostname. chezmoi runs on all commonly-used platforms, like -Linux, macOS, and Windows. It also runs on less commonly-used platforms, like -FreeBSD, OpenBSD, and Termux. - -### Personal and secure - -Nothing leaves your machine, unless you want it to. Your configuration remains -in a git repo under your control. You can write the configuration file in the -format of your choice. chezmoi can retrieve secrets from -[1Password](https://1password.com/), [Bitwarden](https://bitwarden.com/), -[gopass](https://www.gopass.pw/), [KeePassXC](https://keepassxc.org/), -[LastPass](https://lastpass.com/), [pass](https://www.passwordstore.org/), -[Vault](https://www.vaultproject.io/), Keychain, -[Keyring](https://wiki.gnome.org/Projects/GnomeKeyring), or any command-line -utility of your choice. You can encrypt individual files with -[GnuPG](https://www.gnupg.org) or [age](https://age-encryption.org). You can -checkout your dotfiles repo on as many machines as you want without revealing -any secrets to anyone. - -### Transparent - -chezmoi includes verbose and dry run modes so you can review exactly what -changes it will make to your home directory before making them. chezmoi's source -format uses only regular files and directories that map one-to-one with the -files, directories, and symlinks in your home directory that you choose to -manage. If you decide not to use chezmoi in the future, it is easy to move your -data elsewhere. - -### Declarative and robust - -You declare the desired state of files, directories, and symbolic links in your -source of truth and chezmoi updates your home directory to match that state. -What you want is what you get. chezmoi updates all files and symbolic links -atomically. You will never be left with incomplete files that could lock you -out, even if the update process is interrupted. - -### Fast and easy to use - -Using chezmoi feels like using git: the commands are similar and chezmoi runs in -fractions of a second. chezmoi makes most day-to-day operations one line -commands, including installation, initialization, and keeping your machines -up-to-date. chezmoi can pull and apply changes from your dotfiles repo in a -single command, and automatically commit and push changes. - ---- - -## I already have a system to manage my dotfiles, why should I use chezmoi? - -Read the [comparison of chezmoi to other dotfile managers](docs/COMPARISON.md). - ---- - -## How do people use chezmoi? - -### Dotfile repos using chezmoi - -Have a look at people using chezmoi [on -GitHub](https://github.com/topics/chezmoi?o=desc&s=updated) and [on -GitLab](https://gitlab.com/explore/projects?topic=chezmoi). - -### People talking about chezmoi - -Read what [people have said about chezmoi](docs/MEDIA.md). - ---- - -## What documentation is available? - -* [Install guide](docs/INSTALL.md) to get chezmoi installed on your machine with - one or two commands. -* [Quick start guide](docs/QUICKSTART.md) for your first steps. -* [How-to guide](docs/HOWTO.md) for achieving specific tasks. -* [Templating guide](docs/TEMPLATING.md) for working with templates. -* [FAQ](docs/FAQ.md) for questions that aren't answered elsewhere. -* [Changes guide](docs/CHANGES.md) for upgrading from a previous major version - of chezmoi. -* [Reference](docs/REFERENCE.md) for a complete description of chezmoi. -* [Comparison guide](docs/COMPARISON.md) for a comparison with other dotfile managers. -* [Related software](docs/RELATED.md) for third party software that works with - chezmoi. -* [Contributing](docs/CONTRIBUTING.md) and [Architecture](docs/ARCHITECTURE.md) - for people looking to contribute to or package chezmoi. - ---- +chezmoi's documentation is at [chezmoi.io](https://chezmoi.io/). ## License MIT - ---- diff --git a/assets/chezmoi.io/.gitignore b/assets/chezmoi.io/.gitignore deleted file mode 100644 index aba8e262584..00000000000 --- a/assets/chezmoi.io/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -/.hugo_build.lock -/content/docs -!/content/docs/menu -/content/get -/content/get.ps1 -/public -/resources diff --git a/assets/chezmoi.io/Makefile b/assets/chezmoi.io/Makefile deleted file mode 100644 index 3fb40926ad2..00000000000 --- a/assets/chezmoi.io/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -.PHONY: website -website: content - ./make-gh-pages.sh - -.PHONY: serve -serve: content - hugo serve - -.PHONY: content -content: \ - content/docs/architecture.md \ - content/docs/changes.md \ - content/docs/comparison.md \ - content/docs/contributing.md \ - content/docs/faq.md \ - content/docs/how-to.md \ - content/docs/install.md \ - content/docs/media.md \ - content/docs/quick-start.md \ - content/docs/reference.md \ - content/docs/related.md \ - content/docs/security.md \ - content/docs/templating.md \ - content/get \ - content/get.ps1 - -content/docs/architecture.md: ../../docs/ARCHITECTURE.md ../../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile - go run ../../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Architecture" -longtitle="Architecture" < $< > $@ || ( rm -f $@ ; false ) - -content/docs/changes.md: ../../docs/CHANGES.md ../../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile - go run ../../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Changes" -longtitle="Changes" < $< > $@ || ( rm -f $@ ; false ) - -content/docs/comparison.md: ../../docs/COMPARISON.md ../../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile - go run ../../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Comparison" -longtitle="Comparison Guide" < $< > $@ || ( rm -f $@ ; false ) - -content/docs/contributing.md: ../../docs/CONTRIBUTING.md ../../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile - go run ../../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Contributing" -longtitle="Contributing Guide" < $< > $@ || ( rm -f $@ ; false ) - -content/docs/faq.md: ../../docs/FAQ.md ../../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile - go run ../../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="FAQ" -longtitle="Frequently Asked Questions" < $< > $@ || ( rm -f $@ ; false ) - -content/docs/how-to.md: ../../docs/HOWTO.md ../../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile - go run ../../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="How-To" -longtitle="How-To Guide" < $< > $@ || ( rm -f $@ ; false ) - -content/docs/install.md: ../../docs/INSTALL.md ../../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile - go run ../../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Install" -longtitle="Install Guide" < $< > $@ || ( rm -f $@ ; false ) - -content/docs/media.md: ../../docs/MEDIA.md ../../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile - go run ../../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Media" -longtitle="Media" < $< > $@ || ( rm -f $@ ; false ) - -content/docs/quick-start.md: ../../docs/QUICKSTART.md ../../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile - go run ../../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Quick Start" -longtitle="Quick Start Guide" < $< > $@ || ( rm -f $@ ; false ) - -content/docs/reference.md: ../../docs/REFERENCE.md ../../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile - go run ../../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Reference" -longtitle="Reference Manual" < $< > $@ || ( rm -f $@ ; false ) - -content/docs/related.md: ../../docs/RELATED.md ../../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile - go run ../../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Related" -longtitle="Related Software" < $< > $@ || ( rm -f $@ ; false ) - -content/docs/security.md: ../../docs/SECURITY.md ../../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile - go run ../../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Security" -longtitle="Security" < $< > $@ || ( rm -f $@ ; false ) - -content/docs/templating.md: ../../docs/TEMPLATING.md ../../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile - go run ../../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Templating" -longtitle="Templating Guide" < $< > $@ || ( rm -f $@ ; false ) - -content/get: ../scripts/install.sh - cp $< $@ || ( rm -f $@ ; false ) - -content/get.ps1: ../scripts/install.ps1 - cp $< $@ || ( rm -f $@ ; false ) diff --git a/assets/chezmoi.io/archetypes/default.md b/assets/chezmoi.io/archetypes/default.md deleted file mode 100644 index 26f317f303e..00000000000 --- a/assets/chezmoi.io/archetypes/default.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "{{ replace .Name "-" " " | title }}" -date: {{ .Date }} -draft: true ---- diff --git a/assets/chezmoi.io/config.toml b/assets/chezmoi.io/config.toml deleted file mode 100644 index 69d99884e56..00000000000 --- a/assets/chezmoi.io/config.toml +++ /dev/null @@ -1,11 +0,0 @@ -baseURL = "https://chezmoi.io/" -languageCode = "en-us" -theme = "book" -title = "chezmoi.io" - -[params] - BookDateFormat = "2006-02-01" - BookLogo = "logo-144px.svg" - BookMenuBundle = "/menu" - BookRepo = "https://github.com/twpayne/chezmoi" - BookToC = 3 diff --git a/assets/chezmoi.io/content/_index.md b/assets/chezmoi.io/content/_index.md deleted file mode 100644 index 5861a2a332b..00000000000 --- a/assets/chezmoi.io/content/_index.md +++ /dev/null @@ -1,165 +0,0 @@ ---- -title: Home -type: docs ---- - -# chezmoi - -Manage your dotfiles across multiple diverse machines, securely. - -With chezmoi, you can install chezmoi and your dotfiles on a new, empty machine -with a single command: - -```console -$ sh -c "$(curl -fsLS chezmoi.io/get)" -- init --apply <github-username> -``` - -Updating your dotfiles on any machine is a single command: - -```console -$ chezmoi update -``` - ---- - -## How do I start with chezmoi now? - -[Install chezmoi](/docs/install/) then read the [quick start -guide](/docs/quick-start/). The [how-to guide](/docs/how-to/) covers most common -tasks, and there's both documentation on [templating](/docs/templating/) and -[frequently asked questions](/docs/faq/) for specific questions. You can browse -other people's [dotfiles that use chezmoi on -GitHub](https://github.com/topics/chezmoi?o=desc&s=updated) and [dotfiles that -use chezmoi on GitLab](https://gitlab.com/explore/projects?topic=chezmoi), and -see how chezmoi [compares to other dotfile managers](/docs/comparison/). For a -full description of chezmoi, consult the [reference](/docs/reference/). - ---- - -## What does chezmoi do and why should I use it? - -chezmoi helps you manage your personal configuration files (dotfiles, like -`~/.gitconfig`) across multiple machines. - -chezmoi is helpful if you have spent time customizing the tools you use (e.g. -shells, editors, and version control systems) and want to keep machines running -different accounts (e.g. home and work) and/or different operating systems (e.g. -Linux, macOS, and Windows) in sync, while still being able to easily cope with -differences from machine to machine. - -chezmoi scales from the trivial (e.g. copying a few dotfiles onto a Raspberry -Pi, development container, or virtual machine) to complex long-lived -multi-machine development environments (e.g. keeping any number of home and -work, Linux, macOS, and Windows machines in sync). In all cases you only need to -maintain a single source of truth (a single branch in git) and getting started -only requires adding a single binary to your machine (which you can do with -`curl`, `wget`, or `scp`). - -chezmoi has strong support for security, allowing you to manage secrets (e.g. -passwords, access tokens, and private keys) securely and seamlessly using a -password manager and/or encrypt whole files with your favorite encryption tool. - -If you do not personalize your configuration or only ever use a single operating -system with a single account and none of your dotfiles contain secrets then you -don't need chezmoi. Otherwise, read on... - ---- - -## What are chezmoi's key features? - -### Flexible - -You can share as much configuration across machines as you want, while still -being able to control machine-specific details.Your dotfiles can be templates -(using [`text/template`](https://pkg.go.dev/text/template) syntax). Predefined -variables allow you to change behavior depending on operating system, -architecture, and hostname. chezmoi runs on all commonly-used platforms, like -Linux, macOS, and Windows. It also runs on less commonly-used platforms, like -FreeBSD, OpenBSD, and Termux. - -### Personal and secure - -Nothing leaves your machine, unless you want it to. Your configuration remains -in a git repo under your control. You can write the configuration file in the -format of your choice. chezmoi can retrieve secrets from -[1Password](https://1password.com/), [Bitwarden](https://bitwarden.com/), -[gopass](https://www.gopass.pw/), [KeePassXC](https://keepassxc.org/), -[LastPass](https://lastpass.com/), [pass](https://www.passwordstore.org/), -[Vault](https://www.vaultproject.io/), Keychain, -[Keyring](https://wiki.gnome.org/Projects/GnomeKeyring), or any command-line -utility of your choice. You can encrypt individual files with -[GnuPG](https://www.gnupg.org) or [age](https://age-encryption.org). You can -checkout your dotfiles repo on as many machines as you want without revealing -any secrets to anyone. - -### Transparent - -chezmoi includes verbose and dry run modes so you can review exactly what -changes it will make to your home directory before making them. chezmoi's source -format uses only regular files and directories that map one-to-one with the -files, directories, and symlinks in your home directory that you choose to -manage. If you decide not to use chezmoi in the future, it is easy to move your -data elsewhere. - -### Declarative and robust - -You declare the desired state of files, directories, and symbolic links in your -source of truth and chezmoi updates your home directory to match that state. -What you want is what you get. chezmoi updates all files and symbolic links -atomically. You will never be left with incomplete files that could lock you -out, even if the update process is interrupted. - -### Fast and easy to use - -Using chezmoi feels like using git: the commands are similar and chezmoi runs in -fractions of a second. chezmoi makes most day-to-day operations one line -commands, including installation, initialization, and keeping your machines -up-to-date. chezmoi can pull and apply changes from your dotfiles repo in a -single command, and automatically commit and push changes. - ---- - -## I already have a system to manage my dotfiles, why should I use chezmoi? - -Read the [comparison of chezmoi to other dotfile managers](/docs/comparison/). - ---- - -## How do people use chezmoi? - -### Dotfile repos using chezmoi - -Have a look at people using chezmoi [on -GitHub](https://github.com/topics/chezmoi?o=desc&s=updated) and [on -GitLab](https://gitlab.com/search?search=chezmoi). - -### People talking about chezmoi - -Read what [people have said about chezmoi](/docs/media/). - ---- - -## What documentation is available? - -* [Install guide](/docs/install/) to get chezmoi installed on your machine with - one or two commands. -* [Quick start guide](/docs/quick-start/) for your first steps. -* [How-to guide](/docs/how-to/) for achieving specific tasks. -* [Templating guide](/docs/templating/) for working with templates. -* [FAQ](/docs/faq/) for questions that aren't answered elsewhere. -* [Changes guide](/docs/changes/) for upgrading from a previous major version of - chezmoi. -* [Reference](/docs/reference/) for a complete description of chezmoi. -* [Comparison guide](/docs/comparison/) for a comparison with other dotfile managers. -* [Related software](/docs/related/) for third party software that works with - chezmoi. -* [Contributing](/docs/contributing/) and [Architecture](/docs/architecture/) - for people looking to contribute to or package chezmoi. - ---- - -## License - -MIT - ---- diff --git a/assets/chezmoi.io/content/docs/menu/index.md b/assets/chezmoi.io/content/docs/menu/index.md deleted file mode 100644 index 7199085ca71..00000000000 --- a/assets/chezmoi.io/content/docs/menu/index.md +++ /dev/null @@ -1,18 +0,0 @@ -+++ -headless = true -+++ - -- [Install]({{< relref "/docs/install.md" >}}) -- [Quick Start]({{< relref "/docs/quick-start.md" >}}) -- [How-To]({{< relref "/docs/how-to.md" >}}) -- [Templating]({{< relref "/docs/templating.md" >}}) -- [FAQ]({{< relref "/docs/faq.md" >}}) -- [Changes]({{< relref "/docs/changes.md" >}}) -- [Reference]({{< relref "/docs/reference.md" >}}) -- [Media]({{< relref "/docs/media.md" >}}) -- [Comparison]({{< relref "/docs/comparison.md" >}}) -- [Contributing]({{< relref "/docs/contributing.md" >}}) -- [Architecture]({{< relref "/docs/architecture.md" >}}) -- [Related Software]({{< relref "/docs/related.md" >}}) -- [Security]({{< relref "/docs/security.md" >}}) -- [GitHub](https://github.com/twpayne/chezmoi) diff --git a/assets/chezmoi.io/docs/.gitignore b/assets/chezmoi.io/docs/.gitignore new file mode 100644 index 00000000000..225fc6f6650 --- /dev/null +++ b/assets/chezmoi.io/docs/.gitignore @@ -0,0 +1 @@ +/__pycache__ diff --git a/assets/chezmoi.io/docs/comparison-table.md b/assets/chezmoi.io/docs/comparison-table.md new file mode 100644 index 00000000000..38a12383b0d --- /dev/null +++ b/assets/chezmoi.io/docs/comparison-table.md @@ -0,0 +1,43 @@ +# Comparison table + +[chezmoi]: https://chezmoi.io/ +[dotbot]: https://github.com/anishathalye/dotbot +[rcm]: https://github.com/thoughtbot/rcm +[homesick]: https://github.com/technicalpickles/homesick +[vcsh]: https://github.com/RichiH/vcsh +[yadm]: https://yadm.io/ +[bare git]: https://www.atlassian.com/git/tutorials/dotfiles "bare git" + +| | [chezmoi] | [dotbot] | [rcm] | [homesick] | [vcsh] | [yadm] | [bare git] | +| -------------------------------------- | ------------- | ----------------- | ----------------- | ----------------- | ------------------------ | ---------------------------- | ---------- | +| Distribution | Single binary | Python package | Multiple files | Ruby gem | Single script or package | Single script | - | +| Install method | Many | git submodule | Many | Ruby gem | Many | Many | Manual | +| Non-root install on bare system | ✅ | ⁉️ | ⁉️ | ⁉️ | ✅ | ✅ | ✅ | +| Windows support | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | +| Bootstrap requirements | None | Python, git | Perl, git | Ruby, git | sh, git | git | git | +| Source repos | Single | Single | Multiple | Single | Multiple | Single | Single | +| dotfiles are... | Files | Symlinks | Files | Symlinks | Files | Files | Files | +| Config file | Optional | Required | Optional | None | None | Optional | Optional | +| Private files | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | +| Show differences without applying | ✅ | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ | +| Whole file encryption | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | +| Password manager integration | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| Machine-to-machine file differences | Templates | Alternative files | Alternative files | Alternative files | Branches | Alternative files, templates | ⁉️ | +| Custom variables in templates | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| Executable files | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| File creation with initial contents | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | +| Externals | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| Manage partial files | ✅ | ❌ | ❌ | ❌ | ⁉️ | ✅ | ⁉️ | +| File removal | ✅ | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ | +| Directory creation | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | +| Run scripts | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ❌ | +| Run once scripts | ✅ | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ | +| Machine-to-machine symlink differences | ✅ | ❌ | ❌ | ❌ | ⁉️ | ✅ | ⁉️ | +| Shell completion | ✅ | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ | +| Archive import | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | ✅ | +| Archive export | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | ✅ | +| Implementation language | Go | Python | Perl | Ruby | POSIX Shell | Bash | C | + +✅ Supported, ⁉️ Possible with significant manual effort, ❌ Not supported + +For more comparisons, visit [dotfiles.github.io](https://dotfiles.github.io/). diff --git a/docs/ARCHITECTURE.md b/assets/chezmoi.io/docs/developer/architecture.md similarity index 72% rename from docs/ARCHITECTURE.md rename to assets/chezmoi.io/docs/developer/architecture.md index fc185302e82..fecd71de809 100644 --- a/docs/ARCHITECTURE.md +++ b/assets/chezmoi.io/docs/developer/architecture.md @@ -1,20 +1,4 @@ -# chezmoi architecture guide - -<!--- toc ---> -* [Introduction](#introduction) -* [Directory structure](#directory-structure) -* [Key concepts](#key-concepts) -* [`internal/chezmoi/` directory](#internalchezmoi-directory) -* [`internal/cmd/` directory](#internalcmd-directory) -* [Path handling](#path-handling) -* [Persistent state](#persistent-state) -* [Encryption](#encryption) -* [`run_once_` and `run_onchange_` scripts](#run_once_-and-run_onchange_-scripts) -* [Testing](#testing) - ---- - -## Introduction +# Architecture This document gives a high-level overview of chezmoi's source code for anyone interested in contributing to chezmoi. @@ -27,10 +11,8 @@ $ go doc -all -u github.com/twpayne/chezmoi/v2/internal/chezmoi ``` You can also [browse chezmoi's generated documentation -online](https://pkg.go.dev/github.com/twpayne/chezmoi/v2) but this only includes -exported symbols. - ---- +online](https://pkg.go.dev/github.com/twpayne/chezmoi/v2) but this only +includes exported symbols. ## Directory structure @@ -38,41 +20,37 @@ The important directories in chezmoi are: | Directory | Contents | | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `docs/` | The documentation single source of truth. Help text, examples, and the [chezmoi.io](https://chezmoi.io) website are generated from the files in this directory, particularly `docs/REFERENCE.md` | +| `assets/chezmoi.io/docs/` | The documentation single source of truth. Help text, examples, and the [chezmoi.io](https://chezmoi.io) website are generated from the files in this directory, particularly `docs/reference.md` | | `internal/chezmoi/` | chezmoi's core functionality | | `internal/cmd/` | Code for the `chezmoi` command | | `internal/cmd/testdata/scripts/` | High-level tests of chezmoi's commands using [`testscript`](https://pkg.go.dev/github.com/rogpeppe/go-internal/testscript) | ---- - ## Key concepts -As described in the [reference manual](REFERENCE.md), chezmoi evaluates the -source state to compute a target state for the destination directory (typically -your home directory). It then compares the target state to the actual state of -the destination directory and performs any changes necessary to update the -destination directory to match the target state. The concepts are represented -directly in chezmoi's code. +As described in the [reference manual](/reference/concepts/), chezmoi evaluates +the source state to compute a target state for the destination directory +(typically your home directory). It then compares the target state to the +actual state of the destination directory and performs any changes necessary to +update the destination directory to match the target state. These concepts are +represented directly in chezmoi's code. chezmoi uses the generic term *entry* to describe something that it manages. Entries can be files, directories, symlinks, scripts, amongst other things. ---- - ## `internal/chezmoi/` directory -All of chezmoi's interaction with the operating system is abstracted through the -`System` interface. A `System` includes functionality to read and write files -and directories and execute commands. chezmoi makes a distinction between +All of chezmoi's interaction with the operating system is abstracted through +the `System` interface. A `System` includes functionality to read and write +files and directories and execute commands. chezmoi makes a distinction between idempotent commands that can be run multiple times without modifying the underlying system and arbitrary commands that may modify the underlying system. The real underlying system is implemented via a `RealSystem` struct. Other `System`s are composed on top of this to provide further functionality. For example, the `--debug` flag is implemented by wrapping the `RealSystem` with a -`DebugSystem` that logs all calls to the underlying `RealSystem`. `--dry-run` is -implemented by wrapping the `RealSystem` with a `DryRunSystem` that allows reads -to pass through but silently discards all writes. +`DebugSystem` that logs all calls to the underlying `RealSystem`. `--dry-run` +is implemented by wrapping the `RealSystem` with a `DryRunSystem` that allows +reads to pass through but silently discards all writes. The `SourceState` struct represents a source state, including reading a source state from the source directory, executing templates, applying the source state @@ -80,8 +58,8 @@ state from the source directory, executing templates, applying the source state entries to the source state. Entries in the source state are abstracted by the `SourceStateEntry` interface -implemented by the `SourceStateFile` and `SourceStateDir` structs, as the source -state only consists of regular files and directories. +implemented by the `SourceStateFile` and `SourceStateDir` structs, as the +source state only consists of regular files and directories. A `SourceStateFile` includes a `FileAttr` struct describing the attributes parsed from its file name. Similarly, a `SourceStateDir` includes a `DirAttr` @@ -101,25 +79,26 @@ The actual state of an entry in the target state is abstracted via the `ActualStateFile`, `ActualStateSymlink` structs implementing this interface. Finally, an `EntryState` struct represents a serialization of an -`ActualEntryState` for storage in and retrieval from chezmoi's persistent state. -It stores a SHA256 of the entry's contents, rather than the full contents, to -avoid storing secrets in the persistent state. +`ActualEntryState` for storage in and retrieval from chezmoi's persistent +state. It stores a SHA256 of the entry's contents, rather than the full +contents, to avoid storing secrets in the persistent state. With these concepts, chezmoi's apply command is effectively: + 1. Read the source state from the source directory. + 2. For each entry in the source state (`SourceStateEntry`), compute its `TargetStateEntry` and read its actual state in the destination state (`ActualStateEntry`). + 3. If the `ActualStateEntry` is not equivalent to the `TargetStateEntry` then apply the minimal set of changes to the `ActualStateEntry` so that they are equivalent. -Furthermore, chezmoi stores the `EntryState` of each entry that it writes in its -persistent state. chezmoi can then detect if a third party has updated a target -since chezmoi last wrote it by comparing the actual state entry in the target -state with the entry state in the persistent state. - ---- +Furthermore, chezmoi stores the `EntryState` of each entry that it writes in +its persistent state. chezmoi can then detect if a third party has updated a +target since chezmoi last wrote it by comparing the actual state entry in the +target state with the entry state in the persistent state. ## `internal/cmd/` directory @@ -134,8 +113,6 @@ The `Config.persistentPreRunRootE` and `Config.persistentPostRunRootE` methods set up and tear down state for individual commands based on the command's `Annotations` field. ---- - ## Path handling chezmoi uses separate types for absolute paths (`AbsPath`) and relative paths @@ -143,15 +120,13 @@ chezmoi uses separate types for absolute paths (`AbsPath`) and relative paths paths). A further type `SourceRelPath` is a relative path within the source directory and handles file and directory attributes. -Internally, chezmoi normalizes all paths to use forward slashes with an optional -upper-cased Windows volume so they can be compared with string comparisons. -Paths read from the user may include tilde (`~`) to represent the user's home -directory, use forward or backward slashes, and are treated as external paths -(`ExtPath`). These are normalized to absolute paths. chezmoi is case-sensitive -internally and makes no attempt to handle case-insensitive or case-preserving -filesystems. - ---- +Internally, chezmoi normalizes all paths to use forward slashes with an +optional upper-cased Windows volume so they can be compared with string +comparisons. Paths read from the user may include tilde (`~`) to represent the +user's home directory, use forward or backward slashes, and are treated as +external paths (`ExtPath`). These are normalized to absolute paths. chezmoi is +case-sensitive internally and makes no attempt to handle case-insensitive or +case-preserving filesystems. ## Persistent state @@ -163,8 +138,6 @@ mode (`--dry-run`) the actual persistent state is copied into a temporary persistent state in memory which remembers writes but does not persist them to disk. ---- - ## Encryption Encryption tools are abstracted by the `Encryption` interface that contains @@ -172,8 +145,6 @@ methods of encrypting and decrypting files and `[]byte`s. Implementations are the `AGEEncryption` and `GPGEncryption` structs. A `DebugEncryption` struct wraps an `Encryption` interface and logs the methods called. ---- - ## `run_once_` and `run_onchange_` scripts The execution of a `run_once_` script is recorded by storing the SHA256 of its @@ -181,13 +152,11 @@ contents in the `scriptState` bucket in the persistent state. On future invocations the script is only run if no matching contents SHA256 is found in the persistent state. -The execution of a `run_onchange_` script is recorded by storing its target name -in the `entryState` bucket along with its contents SHA256 sum. On future +The execution of a `run_onchange_` script is recorded by storing its target +name in the `entryState` bucket along with its contents SHA256 sum. On future invocations the script is only run if its contents SHA256 sum has changed, and its contents SHA256 sum is then updated in the persistent state. ---- - ## Testing chezmoi has a mix of, unit, integration, and end-to-end tests. Unit and @@ -195,17 +164,17 @@ integration tests use the [`github.com/stretchr/testify`](https://pkg.go.dev/github.com/stretchr/testify) framework. End-to-end tests use [`github.com/rogpeppe/go-internal/testscript`](https://pkg.go.dev/github.com/rogpeppe/go-internal/testscript) -with the test scripts themselves in `testdata/scripts`. You can run individual -end-to-end tests with +with the test scripts themselves in `internal/cmd/testdata/scripts/*.txt`. + +You can run individual end-to-end tests with ```console $ go test ./internal/cmd -run=TestScript/<name> ``` -where `<name>` is the basename of file in `testdata/scripts`. - -Tests should, if at all possible, run unmodified on all operating systems tested -in CI (Linux, macOS, Windows, and FreeBSD). Windows will sometimes need special -handling due to its path separator and lack of POSIX-style file permissions. +where `<name>` is the basename of file without the `.txt` extension. ---- +Tests should, if at all possible, run unmodified on all operating systems +tested in CI (Linux, macOS, Windows, and FreeBSD). Windows will sometimes need +special handling due to its path separator and lack of POSIX-style file +permissions. diff --git a/assets/chezmoi.io/docs/developer/contributing-changes.md b/assets/chezmoi.io/docs/developer/contributing-changes.md new file mode 100644 index 00000000000..7111401a20b --- /dev/null +++ b/assets/chezmoi.io/docs/developer/contributing-changes.md @@ -0,0 +1,42 @@ +# Contributing changes + +Bug reports, bug fixes, and documentation improvements are always welcome. +Please [open an issue](https://github.com/twpayne/chezmoi/issues/new/choose) or +[create a pull +request](https://help.github.com/en/articles/creating-a-pull-request) with your +report, fix, or improvement. + +If you want to make a more significant change, please first [open an +issue](https://github.com/twpayne/chezmoi/issues/new/choose) to discuss the +change that you want to make. Dave Cheney gives a [good +rationale](https://dave.cheney.net/2019/02/18/talk-then-code) as to why this is +important. + +All changes are made via pull requests. In your pull request, please make sure +that: + +* All existing tests pass. + +* There are appropriate additional tests that demonstrate that your PR works as + intended. + +* The documentation is updated, if necessary. For new features you should add + an entry in `assets/chezmoi.io/docs/user-guide/` and a complete description + in `assets/chezmoi.io/docs/reference/`. + +* All generated files are up to date. You can ensure this by running `make + generate` and including any modified files in your commit. + +* The code is correctly formatted, according to + [`gofumpt`](https://mvdan.cc/gofumpt/). You can ensure this by running `make + format`. + +* The code passes [`golangci-lint`](https://github.com/golangci/golangci-lint). + You can ensure this by running `make lint`. + +* The commit messages follow the [conventional commits + specification](https://www.conventionalcommits.org/en/v1.0.0/). + +* Commits are logically separate, with no merge or "fixup" commits. + +* The branch applies cleanly to `master`. diff --git a/assets/chezmoi.io/docs/developer/developing-locally.md b/assets/chezmoi.io/docs/developer/developing-locally.md new file mode 100644 index 00000000000..50ba25c6629 --- /dev/null +++ b/assets/chezmoi.io/docs/developer/developing-locally.md @@ -0,0 +1,51 @@ +# Developing locally + +chezmoi is written in [Go](https://golang.org) and development happens on +[GitHub](https://github.com). chezmoi is a standard Go project, using standard +Go tooling. chezmoi requires Go 1.16 or later. + +Checkout chezmoi: + +```console +$ git clone https://github.com/twpayne/chezmoi.git +$ cd chezmoi +``` + +Build chezmoi: + +```console +$ go build +``` + +!!! hint + + If you try to build chezmoi with an unsupported version of Go you will get + the error: + + ``` + package github.com/twpayne/chezmoi/v2: build constraints exclude all Go files in /home/twp/src/github.com/twpayne/chezmoi + ``` + + +Run all tests: + +```console +$ go test ./... +``` + +chezmoi's tests include integration tests with other software. If the other +software is not found in `$PATH` the tests will be skipped. Running the full +set of tests requires `age`, `base64`, `bash`, `gpg`, `perl`, `python`, `ruby`, +`sed`, `sha256sum`, `unzip`, and `zip`. + +Run chezmoi: + +```console +$ go run . +``` + +Run a set of smoketests, including cross-compilation, tests, and linting: + +```console +$ make smoketest +``` diff --git a/assets/chezmoi.io/docs/developer/install-script.md b/assets/chezmoi.io/docs/developer/install-script.md new file mode 100644 index 00000000000..0506e4281eb --- /dev/null +++ b/assets/chezmoi.io/docs/developer/install-script.md @@ -0,0 +1,19 @@ +# Install script + +chezmoi generates the [install +script](https://github.com/twpayne/chezmoi/blob/master/assets/scripts/install.sh) +from a single source of truth. You must run + +```console +$ go generate +``` + +if you change includes any of the following: + +* Modifications to the install script template. + +* Additions or modifications to the list of supported OSs and architectures. + +chezmoi's continuous integration verifies that all generated files are up to +date. Changes to generated files should be included in the commit that modifies +the source of truth. diff --git a/assets/chezmoi.io/docs/developer/packaging.md b/assets/chezmoi.io/docs/developer/packaging.md new file mode 100644 index 00000000000..ef1c3c1af34 --- /dev/null +++ b/assets/chezmoi.io/docs/developer/packaging.md @@ -0,0 +1,66 @@ +# Packaging + +If you're packaging chezmoi for an operating system or distribution: + +chezmoi has no build dependencies other than the standard Go toolchain. + +chezmoi has no runtime dependencies, but is usually used with `git`, so many +packagers choose to make `git` an install dependency or recommended package. + +Please set the version number, git commit, and build time in the binary. This +greatly assists debugging when end users report problems or ask for help. You +can do this by passing the following flags to `go build`: + +``` +-ldflags "-X main.version=$VERSION + -X main.commit=$COMMIT + -X main.date=$DATE + -X main.builtBy=$BUILT_BY" +``` + +`$VERSION` should be the chezmoi version, e.g. `1.7.3`. Any `v` prefix is +optional and will be stripped, so you can pass the git tag in directly. + +!!! hint + + The command `git describe --abbrev=0 --tags` will return a suitable value + for `$VERSION`. + +`$COMMIT` should be the full git commit hash at which chezmoi is built, e.g. +`4d678ce6850c9d81c7ab2fe0d8f20c1547688b91`. + +!!! hint + + The command `git rev-parse HEAD` will return a suitable value for + `$COMMIT`. + +`$DATE` should be the date of the build as a UNIX timestamp or in RFC3339 +format. + +!!! hint + + The command `git show -s --format=%ct HEAD` returns the UNIX timestamp of + the last commit, e.g. `1636668628`. + + The command `date -u +%Y-%m-%dT%H:%M:%SZ` returns the current time in + RFC3339 format, e.g. `2019-11-23T18:29:25Z`. + +`$BUILT_BY` should be a string indicating what system was used to build the +binary. Typically it should be the name of your packaging system, e.g. +`homebrew`. + +Please enable cgo, if possible. chezmoi can be built and run without cgo, but +the `.chezmoi.username` and `.chezmoi.group` template variables may not be set +correctly on some systems. + +chezmoi includes an `upgrade` command which attempts to self-upgrade. You can +remove this command completely by building chezmoi with the `noupgrade` build +tag. + +chezmoi includes shell completions in the `completions` directory. Please +include these in the package and install them in the shell-appropriate +directory, if possible. + +If the instructions for installing chezmoi in chezmoi's [install +guide](/install/) are absent or incorrect, please open an issue or submit a PR +to correct them. diff --git a/assets/chezmoi.io/docs/developer/releases.md b/assets/chezmoi.io/docs/developer/releases.md new file mode 100644 index 00000000000..2a3c754a003 --- /dev/null +++ b/assets/chezmoi.io/docs/developer/releases.md @@ -0,0 +1,49 @@ +# Releases + +Releases are managed with [`goreleaser`](https://goreleaser.com/). + +## Testing + +To build a test release, without publishing, (Linux only) run: + +```console +$ make test-release +``` + +## Publishing + +Publish a new release by creating and pushing a tag, for example: + +```console +$ git tag v1.2.3 +$ git push --tags +``` + +This triggers a [GitHub Action](https://github.com/twpayne/chezmoi/actions) +that builds and publishes archives, packages, and snaps, and creates a new +[GitHub Release](https://github.com/twpayne/chezmoi/releases). + +!!! note + + Publishing [Snaps](https://snapcraft.io/) requires a `SNAPCRAFT_LOGIN` + [repository + secret](https://github.com/twpayne/chezmoi/settings/secrets/actions). + Snapcraft logins periodically expire. Create a new snapcraft login by + running: + + ```console + $ snapcraft export-login --snaps=chezmoi --channels=stable,candidate,beta,edge --acls=package_upload - + ``` + +!!! note + + [brew](https://brew.sh/) automation will automatically detect new releases + of chezmoi within a few hours and open a pull request in + [https://github.com/Homebrew/homebrew-core](github.com/Homebrew/homebrew-core) + to bump the version. + + If needed, the pull request can be created with: + + ```console + $ brew bump-formula-pr --tag=v1.2.3 chezmoi + ``` diff --git a/docs/SECURITY.md b/assets/chezmoi.io/docs/developer/security.md similarity index 53% rename from docs/SECURITY.md rename to assets/chezmoi.io/docs/developer/security.md index a3dc855c5c5..f261250ff3e 100644 --- a/docs/SECURITY.md +++ b/assets/chezmoi.io/docs/developer/security.md @@ -1,21 +1,12 @@ -# chezmoi security policy - -<!--- toc ---> -* [Supported versions](#supported-versions) -* [Reporting a vulnerability](#reporting-a-vulnerability) - ---- +# Security ## Supported versions Only the most recent version of chezmoi is supported with security updates. ---- - ## Reporting a vulnerability Please report vulnerabilities by [opening a GitHub -issue](https://github.com/twpayne/chezmoi/issues/new/choose) or sending an email -to [email protected]. - ---- +issue](https://github.com/twpayne/chezmoi/issues/new/choose) or sending an +email to +[`[email protected]`](mailto:[email protected]). diff --git a/assets/chezmoi.io/docs/developer/using-make.md b/assets/chezmoi.io/docs/developer/using-make.md new file mode 100644 index 00000000000..643ae725538 --- /dev/null +++ b/assets/chezmoi.io/docs/developer/using-make.md @@ -0,0 +1,20 @@ +# Building and installing with `make` + +chezmoi can be built with GNU make, assuming you have the Go toolchain +installed. + +Running `make` will build a `chezmoi` binary in the current directory for the +host OS and architecture. To embed version information in the binary and +control installation the following variables are available: + +| Variable | Example | Purpose | +| ----------- | ---------------------- | ---------------------------------------------- | +| `$VERSION` | `v2.0.0` | Set version | +| `$COMMIT` | `3895680a`... | Set the git commit at which the code was built | +| `$DATE` | `2019-11-23T18:29:25Z` | The time of the build | +| `$BUILT_BY` | `homebrew` | The packaging system performing the build | +| `$PREFIX` | `/usr` | Installation prefix | +| `$DESTDIR` | `install-root` | Fake installation root | + +Running `make install` will install the `chezmoi` binary in +`${DESTDIR}${PREFIX}/bin`. diff --git a/assets/chezmoi.io/docs/developer/website.md b/assets/chezmoi.io/docs/developer/website.md new file mode 100644 index 00000000000..c0231babfd0 --- /dev/null +++ b/assets/chezmoi.io/docs/developer/website.md @@ -0,0 +1,27 @@ +# Website + +The [website](https://chezmoi.io) is generated with [Material for +MkDocs](https://squidfunk.github.io/mkdocs-material/) from the contents of the +`assets/chezmoi.io/docs/` directory. It hosted by [GitHub pages](https://pages.github.com/) from +the [`gh-pages` branch](https://github.com/twpayne/chezmoi/tree/gh-pages). + +Install Material for MkDocs and the required plugins with: + +```console +$ pip install mkdocs-material mkdocs-redirects mkdocs-simple-hooks +``` + +Test the website locally by running: + +```console +$ cd assets/chezmoi.io +$ mkdocs serve +``` + +and visiting [https://127.0.0.1:8000/](http://127.0.0.1:8000/). + +Deploy the website with: + +```console +$ mkdocs gh-deploy +``` diff --git a/assets/chezmoi.io/docs/hooks.py b/assets/chezmoi.io/docs/hooks.py new file mode 100644 index 00000000000..b795f7ce620 --- /dev/null +++ b/assets/chezmoi.io/docs/hooks.py @@ -0,0 +1,13 @@ +import os +import shutil + +def on_post_build(config, **kwargs): + site_dir = config['site_dir'] + + # copy installation scripts + shutil.copy('../scripts/install.sh', os.path.join(site_dir, 'get')) + shutil.copy('../scripts/install.ps1', os.path.join(site_dir, 'get.ps1')) + + # remove non-website files + os.remove(os.path.join(site_dir, 'hooks.py')) + os.remove(os.path.join(site_dir, 'reference/commands/commands.go')) diff --git a/assets/chezmoi.io/docs/index.md b/assets/chezmoi.io/docs/index.md new file mode 100644 index 00000000000..40d43537c74 --- /dev/null +++ b/assets/chezmoi.io/docs/index.md @@ -0,0 +1,30 @@ +# chezmoi + +Manage your dotfiles across multiple diverse machines, securely. + +With chezmoi, you can install chezmoi and your dotfiles on a new, empty machine +with a single command: + +```console +$ sh -c "$(curl -fsLS chezmoi.io/get)" -- init --apply <github-username> +``` + +Updating your dotfiles on any machine is a single command: + +```console +$ chezmoi update +``` +## Getting started + +[Install chezmoi](/install/) then read the [quick start guide](/quick-start/). +The [user guide](/user-guide/) covers most common tasks. For a full description +of chezmoi, consult the [reference](/reference/). + +## Considering using chezmoi? + +You can browse other people's [dotfiles that use chezmoi on +GitHub](https://github.com/topics/chezmoi?o=desc&s=updated) and [dotfiles that +use chezmoi on GitLab](https://gitlab.com/explore/projects?topic=chezmoi), +[read articles, listen to podcasts, and watch videos about +chezmoi](/links/articles-podcasts-and-videos/) and see [how chezmoi compares to +other dotfile managers](/comparison-table/). diff --git a/assets/chezmoi.io/docs/install.md b/assets/chezmoi.io/docs/install.md new file mode 100644 index 00000000000..7417b8d569c --- /dev/null +++ b/assets/chezmoi.io/docs/install.md @@ -0,0 +1,178 @@ +# Install + +## One-line binary install + +Install the correct binary for your operating system and architecture in `./bin` +with a single command: + +=== "curl" + + ```sh + sh -c "$(curl -fsLS chezmoi.io/get)" + ``` + +=== "wget" + + ```sh + sh -c "$(wget -qO- chezmoi.io/get)" + ``` + +=== "PowerShell" + + ```powershell + (iwr -UseBasicParsing https://chezmoi.io/get.ps1).Content | powershell -c - + ``` + +!!! hint + + If you already have a dotfiles repo using chezmoi on GitHub at + `https://github.com/<github-username>/dotfiles` then you can install + chezmoi and your dotfiles with the single command: + + ```sh + sh -c "$(curl -fsLS chezmoi.io/get)" -- init --apply <github-username> + ``` + +## One-line package install + +Install chezmoi with your package manager with a single command: + +=== "Linux" + + === "snap" + + ```sh + snap install chezmoi --classic + ``` + + === "Linuxbrew" + + ```sh + brew install chezmoi + ``` + + === "asdf" + + ```sh + asdf plugin add chezmoi && asdf install chezmoi <version> + ``` + + === "Alpine" + + ```sh + apk add chezmoi + ``` + + === "Arch" + + ```sh + pacman -S chezmoi + ``` + + === "Guix" + + ```sh + guix install chezmoi + ``` + + === "Nix / NixOS" + + ```sh + nix-env -i chezmoi + ``` + + === "Void" + + ```sh + xbps-install -S chezmoi + ``` + +=== "macOS" + + === "Homebrew" + + ```sh + brew install chezmoi + ``` + + === "MacPorts" + + ```sh + port install chezmoi + ``` + + === "Nix" + + ```sh + nix-env -i chezmoi + ``` + + === "asdf" + + ```sh + asdf plugin add chezmoi && asdf install chezmoi <version> + ``` + +=== "Windows" + + === "Chocolately" + + ``` + choco install chezmoi + ``` + + === "Scoop" + + ``` + scoop bucket add twpayne https://github.com/twpayne/scoop-bucket && scoop install chezmoi + ``` + +=== "FreeBSD" + + ```sh + pkg install chezmoi + ``` + +=== "OpenIndiana" + + ```sh + pkg install application/chezmoi + ``` + +## Download a pre-built Linux package + +Download a package for your operating system and architecture and install it +with your package manager. + +| Distribution | Architectures | Package | +| ------------ | --------------------------------------------------------- | ----------------------------------------------------------- | +| Alpine | `386`, `amd64`, `arm64`, `arm`, `ppc64`, `ppc64le` | [`apk`](https://github.com/twpayne/chezmoi/releases/latest) | +| Debian | `amd64`, `arm64`, `armel`, `i386`, `ppc64`, `ppc64le` | [`deb`](https://github.com/twpayne/chezmoi/releases/latest) | +| RedHat | `aarch64`, `armhfp`, `i686`, `ppc64`, `ppc64le`, `x86_64` | [`rpm`](https://github.com/twpayne/chezmoi/releases/latest) | +| OpenSUSE | `aarch64`, `armhfp`, `i686`, `ppc64`, `ppc64le`, `x86_64` | [`rpm`](https://github.com/twpayne/chezmoi/releases/latest) | +| Ubuntu | `amd64`, `arm64`, `armel`, `i386`, `ppc64`, `ppc64le` | [`deb`](https://github.com/twpayne/chezmoi/releases/latest) | + +## Download a pre-built binary + +Download an archive for your operating system containing a pre-built binary and +shell completions. + +| OS | Architectures | Archive | +| ---------- | --------------------------------------------------- | -------------------------------------------------------------- | +| FreeBSD | `amd64`, `arm`, `arm64`, `i386` | [`tar.gz`](https://github.com/twpayne/chezmoi/releases/latest) | +| Illumos | `amd64` | [`tar.gz`](https://github.com/twpayne/chezmoi/releases/latest) | +| Linux | `amd64`, `arm`, `arm64`, `i386`, `ppc64`, `ppc64le` | [`tar.gz`](https://github.com/twpayne/chezmoi/releases/latest) | +| macOS | `amd64`, `arm64` | [`tar.gz`](https://github.com/twpayne/chezmoi/releases/latest) | +| OpenBSD | `amd64`, `arm`, `arm64`, `i386` | [`tar.gz`](https://github.com/twpayne/chezmoi/releases/latest) | +| Solaris | `amd64` | [`tar.gz`](https://github.com/twpayne/chezmoi/releases/latest) | +| Windows | `amd64`, `arm`, `i386` | [`zip`](https://github.com/twpayne/chezmoi/releases/latest) | + +## Install from source + +Download, build, and install chezmoi for your system with Go 1.16 or later: + +```console +$ git clone https://github.com/twpayne/chezmoi.git +$ cd chezmoi +$ make install +``` diff --git a/docs/MEDIA.md b/assets/chezmoi.io/docs/links/articles-podcasts-and-videos.md similarity index 95% rename from docs/MEDIA.md rename to assets/chezmoi.io/docs/links/articles-podcasts-and-videos.md index dddebd23aee..7b4531adfb5 100644 --- a/docs/MEDIA.md +++ b/assets/chezmoi.io/docs/links/articles-podcasts-and-videos.md @@ -1,14 +1,16 @@ -# chezmoi in the media +# Articles, podcasts, and videos -<!--- toc ---> +!!! tip -Recommended article: [Fedora Magazine: Take back your dotfiles with Chezmoi](https://fedoramagazine.org/take-back-your-dotfiles-with-chezmoi/) + Recommended article: [Fedora Magazine: Take back your dotfiles with Chezmoi](https://fedoramagazine.org/take-back-your-dotfiles-with-chezmoi/) -Recommended video: [chezmoi: manage your dotfiles across multiple, diverse machines, securely](https://fosdem.org/2021/schedule/event/chezmoi/) +!!! tip -Recommended podcast: [Managing Dot Files and an Introduction to Chezmoi](https://www.podfeet.com/blog/2021/07/ccatp-693/) + Recommended video: [chezmoi: manage your dotfiles across multiple, diverse machines, securely](https://fosdem.org/2021/schedule/event/chezmoi/) ---- +!!! tip + + Recommended podcast: [Managing Dot Files and an Introduction to Chezmoi](https://www.podfeet.com/blog/2021/07/ccatp-693/) | Date | Version | Format | Link | | ---------- | ------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -64,11 +66,6 @@ Recommended podcast: [Managing Dot Files and an Introduction to Chezmoi](https:/ | 2019-11-20 | 1.7.2 | Audio/video | [FLOSS weekly episode 556: chezmoi](https://twit.tv/shows/floss-weekly/episodes/556) | | 2019-01-10 | 0.0.11 | Text | [Linux Fu: The kitchen sync](https://hackaday.com/2019/01/10/linux-fu-the-kitchen-sync/) | ---- - To add your article to this page please either [open an issue](https://github.com/twpayne/chezmoi/issues/new/choose) or submit a pull -request that modifies this file -([`docs/MEDIA.md`](https://github.com/twpayne/chezmoi/blob/master/docs/MEDIA.md)). - ---- +request that modifies this file (`assets/chezmoi.io/docs/links/media.md`). diff --git a/assets/chezmoi.io/docs/links/dotfile-repos-using-chezmoi.md b/assets/chezmoi.io/docs/links/dotfile-repos-using-chezmoi.md new file mode 100644 index 00000000000..50e1496912e --- /dev/null +++ b/assets/chezmoi.io/docs/links/dotfile-repos-using-chezmoi.md @@ -0,0 +1,5 @@ +# Dotfile repos using chezmoi + +* [GitHub](https://github.com/topics/chezmoi?o=desc&s=updated) + +* [GitLab](https://gitlab.com/explore/projects/topics/chezmoi) diff --git a/docs/RELATED.md b/assets/chezmoi.io/docs/links/related-software.md similarity index 66% rename from docs/RELATED.md rename to assets/chezmoi.io/docs/links/related-software.md index 34d152629fd..5ec19ea6f49 100644 --- a/docs/RELATED.md +++ b/assets/chezmoi.io/docs/links/related-software.md @@ -1,49 +1,27 @@ -# chezmoi related software - -<!--- toc ---> -* [`github.com/alker0/chezmoi.vim`](#githubcomalker0chezmoivim) -* [`github.com/hussainweb/ansible-role-chezmoi`](#githubcomhussainwebansible-role-chezmoi) -* [`github.com/joke/asdf-chezmoi`](#githubcomjokeasdf-chezmoi) -* [`github.com/tcaxle/drapeau`](#githubcomtcaxledrapeau) -* [`github.com/tuh8888/chezmoi.el`](#githubcomtuh8888chezmoiel) -* [`github.com/Lilja/vim-chezmoi`](#githubcomliljavim-chezmoi) - ---- +# Related software ## [`github.com/alker0/chezmoi.vim`](https://github.com/alker0/chezmoi.vim) Intelligent VIM syntax highlighting when editing files in your source directory. Works with both `chezmoi edit` and editing files directly. ---- - ## [`github.com/hussainweb/ansible-role-chezmoi`](https://github.com/hussainweb/ansible-role-chezmoi) Installs chezmoi on Ubuntu and Debian servers. ---- - ## [`github.com/joke/asdf-chezmoi`](https://github.com/joke/asdf-chezmoi) chezmoi plugin for asdf version manager. ---- - ## [`github.com/tcaxle/drapeau`](https://github.com/tcaxle/drapeau) An add-on to synchronise your colorschemes across systems and allow easy colorscheme switching using chezmoi templates. ---- - ## [`github.com/tuh8888/chezmoi.el`](https://github.com/tuh8888/chezmoi.el) Convenience functions for interacting with chezmoi in Emacs. ---- - ## [`github.com/Lilja/vim-chezmoi`](https://github.com/Lilja/vim-chezmoi) A plugin for VIM to apply the dotfile you are editing on `:w`. - ---- diff --git a/assets/chezmoi.io/content/logo-144px.svg b/assets/chezmoi.io/docs/logo-144px.svg similarity index 100% rename from assets/chezmoi.io/content/logo-144px.svg rename to assets/chezmoi.io/docs/logo-144px.svg diff --git a/assets/chezmoi.io/docs/migrating-from-another-dotfile-manager.md b/assets/chezmoi.io/docs/migrating-from-another-dotfile-manager.md new file mode 100644 index 00000000000..7aa8a41364f --- /dev/null +++ b/assets/chezmoi.io/docs/migrating-from-another-dotfile-manager.md @@ -0,0 +1,17 @@ +# Migrating from another dotfile manager + +## Migrate from a dotfile manager that uses symlinks + +Many dotfile managers replace dotfiles with symbolic links to files in a common +directory. If you `chezmoi add` such a symlink, chezmoi will add the symlink, +not the file. To assist with migrating from symlink-based systems, use the +`--follow` option to `chezmoi add`, for example: + +```console +$ chezmoi add --follow ~/.bashrc +``` + +This will tell `chezmoi add` that the target state of `~/.bashrc` is the target +of the `~/.bashrc` symlink, rather than the symlink itself. When you run +`chezmoi apply`, chezmoi will replace the `~/.bashrc` symlink with the file +contents. diff --git a/docs/QUICKSTART.md b/assets/chezmoi.io/docs/quick-start.md similarity index 80% rename from docs/QUICKSTART.md rename to assets/chezmoi.io/docs/quick-start.md index d1a816308ce..5dcf44b0c2a 100644 --- a/docs/QUICKSTART.md +++ b/assets/chezmoi.io/docs/quick-start.md @@ -1,12 +1,4 @@ -# chezmoi quick start guide - -<!--- toc ---> -* [Concepts](#concepts) -* [Start using chezmoi on your current machine](#start-using-chezmoi-on-your-current-machine) -* [Using chezmoi across multiple machines](#using-chezmoi-across-multiple-machines) -* [Next steps](#next-steps) - ---- +# Quick start ## Concepts @@ -15,13 +7,10 @@ chezmoi stores the desired state of your dotfiles in the directory desired contents and permissions for each dotfile and then makes any changes necessary so that your dotfiles match that state. ---- - ## Start using chezmoi on your current machine -Assuming that you have already [installed -chezmoi](https://github.com/twpayne/chezmoi/blob/master/docs/INSTALL.md), -initialize chezmoi with: +Assuming that you have already [installed chezmoi](/install/), initialize +chezmoi with: ```console $ chezmoi init @@ -93,8 +82,6 @@ Finally, exit the shell in the source directory to return to where you were: $ exit ``` ---- - ## Using chezmoi across multiple machines On a second machine, initialize chezmoi with your dotfiles repo: @@ -138,8 +125,6 @@ On any machine, you can pull and apply the latest changes from your repo with: $ chezmoi update -v ``` ---- - ## Next steps For a full list of commands run: @@ -149,9 +134,7 @@ $ chezmoi help ``` chezmoi has much more functionality. Good starting points are reading [articles -about chezmoi](https://github.com/twpayne/chezmoi/blob/master/docs/MEDIA.md) -adding more dotfiles, and using templates to manage files that vary from machine -to machine and retrieve secrets from your password manager. Read the [how-to -guide](https://github.com/twpayne/chezmoi/blob/master/docs/HOWTO.md) to explore. - ---- +about chezmoi](/links/articles-podcasts-and-videos/) adding more dotfiles, and +using templates to manage files that vary from machine to machine and retrieve +secrets from your password manager. Read the [user manual](/user-manual/) to +explore. diff --git a/assets/chezmoi.io/docs/reference/application-order.md b/assets/chezmoi.io/docs/reference/application-order.md new file mode 100644 index 00000000000..87b5778321f --- /dev/null +++ b/assets/chezmoi.io/docs/reference/application-order.md @@ -0,0 +1,28 @@ +# Application order + +chezmoi is deterministic in its order of application. The order is: + +1. Read the source state. +2. Read the destination state. +3. Compute the target state. +4. Run `run_before_` scripts in alphabetical order. +5. Update entries in the target state (files, directories, scripts, symlinks, + etc.) in alphabetical order of their target name. +6. Run `run_after_` scripts in alphabetical order. + +Target names are considered after all attributes are stripped. + +!!! example + + Given `create_alpha` and `modify_dot_beta` in the source state, `.beta` + will be updated before `alpha` because `.beta` sorts before `alpha`. + +chezmoi assumes that the source or destination states are not modified while +chezmoi is being executed. This assumption permits significant performance +improvements, including allowing chezmoi to only read files from the source and +destination states if they are needed to compute the target state. + +chezmoi's behavior when the above assumptions are violated is undefined. For +example, using a `run_before_` script to update files in the source or +destination states violates the assumption that the source and destination +states do not change while chezmoi is running. diff --git a/assets/chezmoi.io/docs/reference/command-line-flags/common.md b/assets/chezmoi.io/docs/reference/command-line-flags/common.md new file mode 100644 index 00000000000..65cffeddc36 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/command-line-flags/common.md @@ -0,0 +1,39 @@ +# Common command line flags + +The following flags apply to multiple commands where they are relevant. + +## `-f`, `--format` `json`|`yaml` + +Set the output format. + +## `-i`, `--include` *types* + +Only operate on target state entries of type *types*. *types* is a +comma-separated list of target states (`all`, `dirs`, `files`, `remove`, +`scripts`, `symlinks`, and `encrypted`) and can be excluded by preceding them +with a `no`. + +!!! example + + `--include=dirs,files` will cause the command to apply to directories and + files only. + +## `--init` + +Regenerate and reread the config file from the config file template before +computing the target state. + +## `-r`, `--recursive` + +Recurse into subdirectories, `true` by default. + +## `-x`, `--exclude` *types* + +Exclude target state entries of type *types*. *types* is a comma-separated list +of target states (`all`, `dirs`, `files`, `remove`, `scripts`, `symlinks`, and +`encrypted`). + +!!! example + + `--exclude=scripts` will cause the command to not run scripts and + `--exclude=encrypted` will exclude encrypted files. diff --git a/assets/chezmoi.io/docs/reference/command-line-flags/developer.md b/assets/chezmoi.io/docs/reference/command-line-flags/developer.md new file mode 100644 index 00000000000..fe461e402a0 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/command-line-flags/developer.md @@ -0,0 +1,15 @@ +# Developer command line flags + +The following flags are global but only relevant for developers and debugging. + +## `--cpu-profile` *filename* + +Write a [Go CPU profile](https://blog.golang.org/pprof) to *filename*. + +## `--debug` + +Log information helpful for debugging. + +## `--gops` + +Enable the [gops](https://github.com/google/gops) agent. diff --git a/assets/chezmoi.io/docs/reference/command-line-flags/global.md b/assets/chezmoi.io/docs/reference/command-line-flags/global.md new file mode 100644 index 00000000000..1ed70eecfdc --- /dev/null +++ b/assets/chezmoi.io/docs/reference/command-line-flags/global.md @@ -0,0 +1,105 @@ +# Global command line flags + +## `--cache` *directory* + +Use *directory* as the cache directory. + +## `--color` *value* + +Colorize diffs, *value* can be `on`, `off`, `auto`, or any boolean-like value +recognized by `parseBool`. The default is `auto` which will colorize diffs only +if the the environment variable `$NO_COLOR` is not set and stdout is a terminal. + +## `-c`, `--config` *filename* + +Read the configuration from *filename*. + +## `--config-format` `json`|`toml`|`yaml` + +Assume the configuration file is in the given format. This is only needed if +the config filename does not have an extension, for example when it is +`/dev/stdin`. + +## `-D`, `--destination` *directory* + +Use *directory* as the destination directory. + +## `-n`, `--dry-run` + +Set dry run mode. In dry run mode, the destination directory is never modified. +This is most useful in combination with the `-v` (verbose) flag to print +changes that would be made without making them. + +## `--force` + +Make changes without prompting. + +## `-h`, `--help` + +Print help. + +## `-k`, `--keep-going` + +Keep going as far as possible after a encountering an error. + +## `--no-pager` + +Do not use the pager. + +## `--no-tty` + +Do not attempt to get a TTY to read input and passwords. Instead, read them +from stdin. + +## `-o`, `--output` *filename* + +Write the output to *filename* instead of stdout. + +## `--persistent-state` *filename* + +Read and write the persistent state from *filename*. By default, chezmoi stores +its persistent state in `chezmoistate.boltdb` in the same directory as its +configuration file. + +## `-R`, `--refresh-externals` + +Refresh externals cache. See `.chezmoiexternal.<format>`. + +## `-S`, `--source` *directory* + +Use *directory* as the source directory. + +## `--use-builtin-age` *value* + +Use chezmoi's builtin [age encryption](https://age-encryption.org) instead of +an external `age` command. *value* can be `on`, `off`, `auto`, or any +boolean-like value recognized by `parseBool`. The default is `auto` which will +only use the builtin age if `age.command` cannot be found in `$PATH`. + +The builtin `age` command does not support passphrases, symmetric encryption, +or the use of SSH keys. + +## `--use-builtin-git` *value* + +Use chezmoi's builtin git instead of `git.command` for the `init` and `update` +commands. *value* can be `on`, `off`, `auto`, or any boolean-like value +recognized by `parseBool`. The default is `auto` which will only use the +builtin git if `git.command` cannot be found in `$PATH`. + +## `-v`, `--verbose` + +Set verbose mode. In verbose mode, chezmoi prints the changes that it is making +as approximate shell commands, and any differences in files between the target +state and the destination set are printed as unified diffs. + +## `--version` + +Print the version of chezmoi, the commit at which it was built, and the build +timestamp. + +## `-w`, `--working-tree` *directory* + +Use *directory* as the git working tree directory. By default, chezmoi searches +the source directory and then its ancestors for the first directory that +contains a `.git` directory. + diff --git a/assets/chezmoi.io/docs/reference/command-line-flags/index.md b/assets/chezmoi.io/docs/reference/command-line-flags/index.md new file mode 100644 index 00000000000..b51d8492b2e --- /dev/null +++ b/assets/chezmoi.io/docs/reference/command-line-flags/index.md @@ -0,0 +1,3 @@ +# Command line flags + +Command line flags override any values set in the configuration file. diff --git a/assets/chezmoi.io/docs/reference/commands/add.md b/assets/chezmoi.io/docs/reference/commands/add.md new file mode 100644 index 00000000000..f69aef6da2c --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/add.md @@ -0,0 +1,65 @@ +# `add` *target*... + +Add *target*s to the source state. If any target is already in the source +state, then its source state is replaced with its current state in the +destination directory. + +## `--autotemplate` + +Automatically generate a template by replacing strings with variable names from +the `data` section of the config file. Longer substitutions occur before +shorter ones. This implies the `--template` option. + +## `-e`, `--empty` + +Set the `empty` attribute on added files. + +## `--encrypt` + +Encrypt files using the defined encryption method. + +## `-f`, `--force` + +Add *target*s, even if doing so would cause a source template to be +overwritten. + +## `--follow` + +If the last part of a target is a symlink, add the target of the symlink +instead of the symlink itself. + +## `--exact` + +Set the `exact` attribute on added directories. + +## `-i`, `--include` *types* + +Only add entries of type *types*. + +## `-p`, `--prompt` + +Interactively prompt before adding each file. + +## `-r`, `--recursive` + +Recursively add all files, directories, and symlinks. + +## `-T`, `--template` + +Set the `template` attribute on added files and symlinks. + +## `--template-symlinks` + +When adding symlink to an absolute path in the source directory or destination +directory, create a symlink template with `.chezmoi.sourceDir` or +`.chezmoi.homeDir`. This is useful for creating portable absolute symlinks. + +!!! example + + ```console + $ chezmoi add ~/.bashrc + $ chezmoi add ~/.gitconfig --template + $ chezmoi add ~/.ssh/id_rsa --encrypt + $ chezmoi add ~/.vim --recursive + $ chezmoi add ~/.oh-my-zsh --exact --recursive + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/apply.md b/assets/chezmoi.io/docs/reference/commands/apply.md new file mode 100644 index 00000000000..553320796d1 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/apply.md @@ -0,0 +1,23 @@ +# `apply` [*target*...] + +Ensure that *target*... are in the target state, updating them if necessary. If +no targets are specified, the state of all targets are ensured. If a target has +been modified since chezmoi last wrote it then the user will be prompted if +they want to overwrite the file. + +## `-i`, `--include` *types* + +Only add entries of type *types*. + +## `--source-path` + +Specify targets by source path, rather than target path. This is useful for +applying changes after editing. + +!!! example + + ```console + $ chezmoi apply + $ chezmoi apply --dry-run --verbose + $ chezmoi apply ~/.bashrc + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/archive.md b/assets/chezmoi.io/docs/reference/commands/archive.md new file mode 100644 index 00000000000..841a1fb7971 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/archive.md @@ -0,0 +1,26 @@ +# `archive` [*target*....] + +Generate an archive of the target state, or only the targets specified. This +can be piped into `tar` to inspect the target state. + +## `-f`, `--format` `tar`|`tar.gz`|`tgz`|`zip` + +Write the archive in *format*. If `--output` is set the format is guessed from +the extension, otherwise the default is `tar`. + +## `-i`, `--include` *types* + +Only include entries of type *types*. + +## `-z`, `--gzip` + +Compress the archive with gzip. This is automatically set if the format is +`tar.gz` or `tgz` and is ignored if the format is `zip`. + +!!! example + + ```console + $ chezmoi archive | tar tvf - + $ chezmoi archive --output=dotfiles.tar.gz + $ chezmoi archive --output=dotfiles.zip + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/cat.md b/assets/chezmoi.io/docs/reference/commands/cat.md new file mode 100644 index 00000000000..544ab99ebc8 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/cat.md @@ -0,0 +1,12 @@ +# `cat` *target*... + +Write the target contents of *target*s to stdout. *target*s must be files, +scripts, or symlinks. For files, the target file contents are written. For +scripts, the script's contents are written. For symlinks, the target target is +written. + +!!! example + + ```console + $ chezmoi cat ~/.bashrc + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/cd.md b/assets/chezmoi.io/docs/reference/commands/cd.md new file mode 100644 index 00000000000..72c967c6027 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/cd.md @@ -0,0 +1,21 @@ +# `cd` + +Launch a shell in the working tree (typically the source directory). chezmoi +will launch the command set by the `cd.command` configuration variable with any +extra arguments specified by `cd.args`. If this is not set, chezmoi will +attempt to detect your shell and finally fall back to an OS-specific default. + +!!! hint + + This does not change the current directory of the current shell. To do + that, instead use: + + ```console + $ cd $(chezmoi source-path) + ``` + +!!! example + + ```console + $ chezmoi cd + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/chattr.md b/assets/chezmoi.io/docs/reference/commands/chattr.md new file mode 100644 index 00000000000..3714de27f5e --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/chattr.md @@ -0,0 +1,48 @@ +# `chattr` *modifier* *target*... + +Change the attributes and/or type of *target*s. *modifier* specifies what to +modify. + +Add attributes by specifying them or their abbreviations directly, optionally +prefixed with a plus sign (`+`). Remove attributes by prefixing them or their +attributes with the string `no` or a minus sign (`-`). The available attribute +modifiers and their abbreviations are: + +| Attribute modifier | Abbreviation | +| ------------------ | ------------ | +| `after` | `a` | +| `before` | `b` | +| `empty` | `e` | +| `encrypted` | *none* | +| `exact` | *none* | +| `executable` | `x` | +| `once` | `o` | +| `private` | `p` | +| `readonly` | `r` | +| `template` | `t` | + +The type of a target can be changed using a type modifier: + +| Type modifier | +| ------------- | +| `create` | +| `modify` | +| `script` | +| `symlink` | + +The negative form of type modifiers, e.g. `nocreate`, changes the target to be +a regular file if it is of that type, otherwise the type is left unchanged. + +Multiple modifications may be specified by separating them with a comma (`,`). +If you use the `-`*modifier* form then you must put *modifier* after a `--` to +prevent chezmoi from interpreting `-`*modifier* as an option. + +!!! example + + ```console + $ chezmoi chattr template ~/.bashrc + $ chezmoi chattr noempty ~/.profile + $ chezmoi chattr private,template ~/.netrc + $ chezmoi chattr -- -x ~/.zshrc + $ chezmoi chattr +create,+private ~/.kube/config + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/commands.go b/assets/chezmoi.io/docs/reference/commands/commands.go new file mode 100644 index 00000000000..83acfab47d6 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/commands.go @@ -0,0 +1,8 @@ +// Package commands contains chezmoi's documentation for commands. +package commands + +import "embed" + +// FS contains all docs. +//go:embed *.md +var FS embed.FS diff --git a/assets/chezmoi.io/docs/reference/commands/completion.md b/assets/chezmoi.io/docs/reference/commands/completion.md new file mode 100644 index 00000000000..8ff1657f6d2 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/completion.md @@ -0,0 +1,11 @@ +# `completion` *shell* + +Generate shell completion code for the specified shell (`bash`, `fish`, +`powershell`, or `zsh`). + +!!! example + + ```console + $ chezmoi completion bash + $ chezmoi completion fish --output=~/.config/fish/completions/chezmoi.fish + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/data.md b/assets/chezmoi.io/docs/reference/commands/data.md new file mode 100644 index 00000000000..d04ea63cca3 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/data.md @@ -0,0 +1,14 @@ +# `data` + +Write the computed template data to stdout. + +## `-f`, `--format` `json`|`yaml` + +Set the output format. + +!!! example + + ```console + $ chezmoi data + $ chezmoi data --format=yaml + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/decrypt.md b/assets/chezmoi.io/docs/reference/commands/decrypt.md new file mode 100644 index 00000000000..bfdd9bee2cb --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/decrypt.md @@ -0,0 +1,5 @@ +# `decrypt` [*file*...] + +Decrypt *file*s using chezmoi's configured encryption. If no files are given, +decrypt the standard input. The decrypted result is written to the standard +output or a file if the `--output` flag is set. diff --git a/assets/chezmoi.io/docs/reference/commands/diff.md b/assets/chezmoi.io/docs/reference/commands/diff.md new file mode 100644 index 00000000000..e30ec4c23b2 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/diff.md @@ -0,0 +1,36 @@ +# `diff` [*target*...] + +Print the difference between the target state and the destination state for +*target*s. If no targets are specified, print the differences for all targets. + +If a `diff.pager` command is set in the configuration file then the output will +be piped into it. + +If `diff.command` is set then it will be invoked to show individual file +differences with `diff.args` passed as arguments. Each element of `diff.args` +is interpreted as a template with the variables `.Destination` and `.Target` +available corresponding to the path of the file in the source and target state +respectively. The default value of `diff.args` is `["{{ .Destination }}", "{{ + .Target }}"]`. If `diff.args` does not contain any template arguments then + `{{ .Destination }}` and `{{ .Target }}` will be appended automatically. + +## `--reverse` + +Reverse the direction of the diff, i.e. show the changes to the target required +to match the destination. + +## `--pager` *pager* + +Pager to use for output. + +## `--use-builtin-diff` + +Use chezmoi's builtin diff, even if the `diff.command` configuration variable +is set. + +!!! example + + ```console + $ chezmoi diff + $ chezmoi diff ~/.bashrc + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/doctor.md b/assets/chezmoi.io/docs/reference/commands/doctor.md new file mode 100644 index 00000000000..caafbae7305 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/doctor.md @@ -0,0 +1,9 @@ +# `doctor` + +Check for potential problems. + +!!! example + + ```console + $ chezmoi doctor + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/dump.md b/assets/chezmoi.io/docs/reference/commands/dump.md new file mode 100644 index 00000000000..c62b65e6f70 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/dump.md @@ -0,0 +1,19 @@ +# `dump` [*target*...] + +Dump the target state of *target*s. If no targets are specified, then the +entire target state. + +## `-f`, `--format` `json`|`yaml` + +Set the output format. + +## `-i`, `--include` *types* + +Only include entries of type *types*. + +!!! example + + ```console + $ chezmoi dump ~/.bashrc + $ chezmoi dump --format=yaml + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/edit-config.md b/assets/chezmoi.io/docs/reference/commands/edit-config.md new file mode 100644 index 00000000000..3346838ec93 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/edit-config.md @@ -0,0 +1,9 @@ +# `edit-config` + +Edit the configuration file. + +!!! example + + ```console + $ chezmoi edit-config + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/edit.md b/assets/chezmoi.io/docs/reference/commands/edit.md new file mode 100644 index 00000000000..6b28c5e8cbd --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/edit.md @@ -0,0 +1,31 @@ +# `edit` [*target*...] + +Edit the source state of *target*s, which must be files or symlinks. If no +targets are given then the working tree of the source directory is opened. + +Encrypted files are decrypted to a private temporary directory and the editor +is invoked with the decrypted file. When the editor exits the edited decrypted +file is re-encrypted and replaces the original file in the source state. + +If the operating system supports hard links, then the edit command invokes the +editor with filenames which match the target filename, unless the +`edit.hardlink` configuration variable is set to `false` the `--hardlink=false` +command line flag is set. + +## `-a`, `--apply` + +Apply target immediately after editing. Ignored if there are no targets. + +## `--hardlink` *bool* + +Invoke the editor with a hard link to the source file with a name matching the +target filename. This can help the editor determine the type of the file +correctly. This is the default. + +!!! example + + ```console + $ chezmoi edit ~/.bashrc + $ chezmoi edit ~/.bashrc --apply + $ chezmoi edit + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/encrypt.md b/assets/chezmoi.io/docs/reference/commands/encrypt.md new file mode 100644 index 00000000000..abbb865a902 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/encrypt.md @@ -0,0 +1,5 @@ +# `encrypt` [*file*...] + +Encrypt *file*s using chezmoi's configured encryption. If no files are given, +encrypt the standard input. The encrypted result is written to the standard +output or a file if the `--output` flag is set. diff --git a/assets/chezmoi.io/docs/reference/commands/execute-template.md b/assets/chezmoi.io/docs/reference/commands/execute-template.md new file mode 100644 index 00000000000..84d2e63c26b --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/execute-template.md @@ -0,0 +1,44 @@ +# `execute-template` [*template*...] + +Execute *template*s. This is useful for testing templates or for calling +chezmoi from other scripts. *templates* are interpreted as literal templates, +with no whitespace added to the output between arguments. If no templates are +specified, the template is read from stdin. + +## `--init`, `-i` + +Include simulated functions only available during `chezmoi init`. + +## `--promptBool` *pairs* + +Simulate the `promptBool` function with a function that returns values from +*pairs*. *pairs* is a comma-separated list of *prompt*`=`*value* pairs. If +`promptBool` is called with a *prompt* that does not match any of *pairs*, then +it returns false. + +## `--promptInt` *pairs* + +Simulate the `promptInt` function with a function that returns values from +*pairs*. *pairs* is a comma-separated list of *prompt*`=`*value* pairs. If +`promptInt` is called with a *prompt* that does not match any of *pairs*, then +it returns zero. + +## `--promptString`, `-p` *pairs* + +Simulate the `promptString` function with a function that returns values from +*pairs*. *pairs* is a comma-separated list of *prompt*`=`*value* pairs. If +`promptString` is called with a *prompt* that does not match any of *pairs*, +then it returns *prompt* unchanged. + +## `--stdinisatty` *bool* + +Simulate the `stdinIsATTY` function by returning *bool*. + +!!! example + + ```console + $ chezmoi execute-template '{{ .chezmoi.sourceDir }}' + $ chezmoi execute-template '{{ .chezmoi.os }}' / '{{ .chezmoi.arch }}' + $ echo '{{ .chezmoi | toJson }}' | chezmoi execute-template + $ chezmoi execute-template --init --promptString [email protected] < ~/.local/share/chezmoi/.chezmoi.toml.tmpl + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/forget.md b/assets/chezmoi.io/docs/reference/commands/forget.md new file mode 100644 index 00000000000..b5f7b20b9d1 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/forget.md @@ -0,0 +1,9 @@ +# `forget` *target*... + +Remove *target*s from the source state, i.e. stop managing them. + +!!! example + + ```console + $ chezmoi forget ~/.bashrc + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/git.md b/assets/chezmoi.io/docs/reference/commands/git.md new file mode 100644 index 00000000000..e07154c61f8 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/git.md @@ -0,0 +1,13 @@ +# `git` [*arg*...] + +Run `git` *arg*s in the working tree (typically the source directory). Note +that flags in *arguments* must occur after `--` to prevent chezmoi from +interpreting them. + +!!! example + + ```console + $ chezmoi git add . + $ chezmoi git add dot_gitconfig + $ chezmoi git -- commit -m "Add .gitconfig" + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/help.md b/assets/chezmoi.io/docs/reference/commands/help.md new file mode 100644 index 00000000000..23b5052d922 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/help.md @@ -0,0 +1,4 @@ +# `help` [*command*...] + +Print the help associated with *command*, or general help if no command is +given. diff --git a/assets/chezmoi.io/docs/reference/commands/import.md b/assets/chezmoi.io/docs/reference/commands/import.md new file mode 100644 index 00000000000..fc4a3c6cb0f --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/import.md @@ -0,0 +1,33 @@ +# `import` *filename* + +Import the source state from an archive file in to a directory in the source +state. This is primarily used to make subdirectories of your home directory +exactly match the contents of a downloaded archive. You will generally always +want to set the `--destination`, `--exact`, and `--remove-destination` flags. + +The supported archive formats are `tar`, `tar.gz`, `tgz`, `tar.bz2`, `tbz2`, +and `zip`. + +## `--destination` *directory* + +Set the destination (in the source state) where the archive will be imported. + +## `--exact` + +Set the `exact` attribute on all imported directories. + +## `-r`, `--remove-destination` + +Remove destination (in the source state) before importing. + +## `--strip-components` *n* + +Strip *n* leading components from paths. + +!!! example + + ```console + $ curl -s -L -o ${TMPDIR}/oh-my-zsh-master.tar.gz https://github.com/ohmyzsh/ohmyzsh/archive/master.tar.gz + $ mkdir -p $(chezmoi source-path)/dot_oh-my-zsh + $ chezmoi import --strip-components 1 --destination ~/.oh-my-zsh ${TMPDIR}/oh-my-zsh-master.tar.gz + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/index.md b/assets/chezmoi.io/docs/reference/commands/index.md new file mode 100644 index 00000000000..61c515e7b46 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/index.md @@ -0,0 +1 @@ +# Commands diff --git a/assets/chezmoi.io/docs/reference/commands/init.md b/assets/chezmoi.io/docs/reference/commands/init.md new file mode 100644 index 00000000000..898ec53f3fd --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/init.md @@ -0,0 +1,81 @@ +# `init` [*repo*] + +Setup the source directory, generate the config file, and optionally update the +destination directory to match the target state. *repo* is expanded to a full +git repo URL, using HTTPS by default, or SSH if the `--ssh` option is +specified, according to the following patterns: + +| Pattern | HTTPS Repo | SSH repo | +| ------------------ | -------------------------------------- | ---------------------------------- | +| `user` | `https://github.com/user/dotfiles.git` | `[email protected]:user/dotfiles.git` | +| `user/repo` | `https://github.com/user/repo.git` | `[email protected]:user/repo.git` | +| `site/user/repo` | `https://site/user/repo.git` | `git@site:user/repo.git` | +| `~sr.ht/user` | `https://git.sr.ht/~user/dotfiles` | `[email protected]:~user/dotfiles.git` | +| `~sr.ht/user/repo` | `https://git.sr.ht/~user/repo` | `[email protected]:~/user/repo.git` | + +First, if the source directory is not already contain a repository, then if +*repo* is given it is checked out into the source directory, otherwise a new +repository is initialized in the source directory. + +Second, if a file called `.chezmoi.<format>.tmpl` exists, where `<format>` is +one of the supported file formats (e.g. `json`, `toml`, or `yaml`) then a new +configuration file is created using that file as a template. + +Then, if the `--apply` flag is passed, `chezmoi apply` is run. + +Then, if the `--purge` flag is passed, chezmoi will remove its source, config, +and cache directories. + +Finally, if the `--purge-binary` is passed, chezmoi will attempt to remove its +own binary. + +## `--apply` + +Run `chezmoi apply` after checking out the repo and creating the config file. + +## `--branch` *branch* + +Check out *branch* instead of the default branch. + +## `--config-path` *path* + +Write the generated config file to *path* instead of the default location. + +## `--data` *bool* + +Include existing template data when creating the config file. This defaults to +`true`. Set this to `false` to simulate creating the config file with no +existing template data. + +## `--depth` *depth* + +Clone the repo with depth *depth*. + +## `--one-shot` + +`--one-shot` is the equivalent of `--apply`, `--depth=1`, `--force`, `--purge`, +and `--purge-binary`. It attempts to install your dotfiles with chezmoi and +then remove all traces of chezmoi from the system. This is useful for setting +up temporary environments (e.g. Docker containers). + +## `--purge` + +Remove the source and config directories after applying. + +## `--purge-binary` + +Attempt to remove the chezmoi binary after applying. + +## `--ssh` + +Guess an SSH repo URL instead of an HTTPS repo. + +!!! example + + ```console + $ chezmoi init user + $ chezmoi init user --apply + $ chezmoi init user --apply --purge + $ chezmoi init user/dots + $ chezmoi init gitlab.com/user + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/list.md b/assets/chezmoi.io/docs/reference/commands/list.md new file mode 100644 index 00000000000..821a7b2024e --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/list.md @@ -0,0 +1,3 @@ +# `list` + +`list` is an alias for `managed`. diff --git a/assets/chezmoi.io/docs/reference/commands/manage.md b/assets/chezmoi.io/docs/reference/commands/manage.md new file mode 100644 index 00000000000..a464c0b3e1c --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/manage.md @@ -0,0 +1,3 @@ +# `manage` *target*... + +`manage` is an alias for `add` for symmetry with `unmanage`. diff --git a/assets/chezmoi.io/docs/reference/commands/managed.md b/assets/chezmoi.io/docs/reference/commands/managed.md new file mode 100644 index 00000000000..f911710e948 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/managed.md @@ -0,0 +1,17 @@ +# `managed` + +List all managed entries in the destination directory in alphabetical order. + +## `-i`, `--include` *types* + +Only include entries of type *types*. + +!!! example + + ```console + $ chezmoi managed + $ chezmoi managed --include=files + $ chezmoi managed --include=files,symlinks + $ chezmoi managed -i dirs + $ chezmoi managed -i dirs,files + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/merge-all.md b/assets/chezmoi.io/docs/reference/commands/merge-all.md new file mode 100644 index 00000000000..7ddc6205ad8 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/merge-all.md @@ -0,0 +1,10 @@ +# `merge-all` + +Perform a three-way merge for file whose actual state does not match its target +state. The merge is performed with `chezmoi merge`. + +!!! example + + ```console + $ chezmoi merge-all + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/merge.md b/assets/chezmoi.io/docs/reference/commands/merge.md new file mode 100644 index 00000000000..50216cbe3de --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/merge.md @@ -0,0 +1,23 @@ +# `merge` *target*... + +Perform a three-way merge between the destination state, the target state, and +the source state for each *target*. The merge tool is defined by the +`merge.command` configuration variable, and defaults to `vimdiff`. If multiple +targets are specified the merge tool is invoked separately and sequentially for +each target. If the target state cannot be computed (for example if source is a +template containing errors or an encrypted file that cannot be decrypted) a +two-way merge is performed instead. + +The order of arguments to `merge.command` is set by `merge.args`. Each argument +is interpreted as a template with the variables `.Destination`, `.Source`, and +`.Target` available corresponding to the path of the file in the destination +state, the source state, and the target state respectively. The default value +of `merge.args` is `["{{ .Destination }}", "{{ .Source }}", "{{ .Target }}"]`. +If `merge.args` does not contain any template arguments then `{{ .Destination +}}`, `{{ .Source }}`, and `{{ .Target }}` will be appended automatically. + +!!! example + + ```console + $ chezmoi merge ~/.bashrc + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/purge.md b/assets/chezmoi.io/docs/reference/commands/purge.md new file mode 100644 index 00000000000..a1b7582314a --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/purge.md @@ -0,0 +1,15 @@ +# `purge` + +Remove chezmoi's configuration, state, and source directory, but leave the +target state intact. + +## `-f`, `--force` + +Remove without prompting. + +!!! example + + ```console + $ chezmoi purge + $ chezmoi purge --force + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/re-add.md b/assets/chezmoi.io/docs/reference/commands/re-add.md new file mode 100644 index 00000000000..164df30930f --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/re-add.md @@ -0,0 +1,10 @@ +# `re-add` + +Re-add all modified files in the target state. chezmoi will not overwrite +templates, and all entries that are not files are ignored. + +!!! example + + ```console + $ chezmoi re-add + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/remove.md b/assets/chezmoi.io/docs/reference/commands/remove.md new file mode 100644 index 00000000000..ee832f43fef --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/remove.md @@ -0,0 +1,7 @@ +# `remove` *target*... + +Remove *target*s from both the source state and the destination directory. + +## `-f`, `--force` + +Remove without prompting. diff --git a/assets/chezmoi.io/docs/reference/commands/rm.md b/assets/chezmoi.io/docs/reference/commands/rm.md new file mode 100644 index 00000000000..76f3f87b23b --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/rm.md @@ -0,0 +1,3 @@ +# `rm` *target*... + +`rm` is an alias for `remove`. diff --git a/assets/chezmoi.io/docs/reference/commands/secret.md b/assets/chezmoi.io/docs/reference/commands/secret.md new file mode 100644 index 00000000000..307481670b0 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/secret.md @@ -0,0 +1,23 @@ +# `secret` + +Run a secret manager's CLI, passing any extra arguments to the secret manager's +CLI. This is primarily for verifying chezmoi's integration with your secret +manager. Normally you would use template functions to retrieve secrets. Note +that if you want to pass flags to the secret manager's CLI you will need to +separate them with `--` to prevent chezmoi from interpreting them. + +!!! hint + + To get a full list of subcommands run: + + ```console + $ chezmoi secret help + ``` + +!!! example + + ```console + $ chezmoi secret keyring set --service=service --user=user --value=password + $ chezmoi secret keyring get --service=service --user=user + $ chezmoi secret keyring delete --service=service --user=user + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/source-path.md b/assets/chezmoi.io/docs/reference/commands/source-path.md new file mode 100644 index 00000000000..55e8c376d95 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/source-path.md @@ -0,0 +1,11 @@ +# `source-path` [*target*...] + +Print the path to each target's source state. If no targets are specified then +print the source directory. + +!!! example + + ```console + $ chezmoi source-path + $ chezmoi source-path ~/.bashrc + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/state.md b/assets/chezmoi.io/docs/reference/commands/state.md new file mode 100644 index 00000000000..da61bba7ffc --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/state.md @@ -0,0 +1,24 @@ +# `state` + +Manipulate the persistent state. + +!!! hint + + To get a full list of subcommands run: + + ```console + $ chezmoi state help + ``` + +!!! example + + ```console + $ chezmoi state data + $ chezmoi state delete --bucket=bucket --key=key + $ chezmoi state delete-bucket --bucket=bucket + $ chezmoi state dump + $ chezmoi state get --bucket=bucket --key=key + $ chezmoi state get-bucket --bucket=bucket + $ chezmoi state set --bucket=bucket --key=key --value=value + $ chezmoi state reset + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/status.md b/assets/chezmoi.io/docs/reference/commands/status.md new file mode 100644 index 00000000000..aab10c41b30 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/status.md @@ -0,0 +1,18 @@ +# `status` + +Print the status of the files and scripts managed by chezmoi in a format +similar to [`git status`](https://git-scm.com/docs/git-status). + +The first column of output indicates the difference between the last state +written by chezmoi and the actual state. The second column indicates the +difference between the actual state and the target state. + +## `-i`, `--include` *types* + +Only include entries of type *types*. + +!!! example + + ```console + $ chezmoi status + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/unmanage.md b/assets/chezmoi.io/docs/reference/commands/unmanage.md new file mode 100644 index 00000000000..cf086d7c93f --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/unmanage.md @@ -0,0 +1,3 @@ +# `unmanage` *target*... + +`unmanage` is an alias for `forget` for symmetry with `manage`. diff --git a/assets/chezmoi.io/docs/reference/commands/unmanaged.md b/assets/chezmoi.io/docs/reference/commands/unmanaged.md new file mode 100644 index 00000000000..719a8b289d0 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/unmanaged.md @@ -0,0 +1,9 @@ +# `unmanaged` + +List all unmanaged files in the destination directory. + +!!! example + + ```console + $ chezmoi unmanaged + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/update.md b/assets/chezmoi.io/docs/reference/commands/update.md new file mode 100644 index 00000000000..56b06ed0bef --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/update.md @@ -0,0 +1,13 @@ +# `update` + +Pull changes from the source repo and apply any changes. + +## `-i`, `--include` *types* + +Only update entries of type *types*. + +!!! example + + ```console + $ chezmoi update + ``` diff --git a/assets/chezmoi.io/docs/reference/commands/upgrade.md b/assets/chezmoi.io/docs/reference/commands/upgrade.md new file mode 100644 index 00000000000..99a39e44d84 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/upgrade.md @@ -0,0 +1,18 @@ +# `upgrade` + +Upgrade chezmoi by downloading and installing the latest released version. This +will call the GitHub API to determine if there is a new version of chezmoi +available, and if so, download and attempt to install it in the same way as +chezmoi was previously installed. + +If the any of the `$CHEZMOI_GITHUB_ACCESS_TOKEN`, `$CHEZMOI_GITHUB_TOKEN`, +`$GITHUB_ACCESS_TOKEN`, or `$GITHUB_TOKEN` environment variables are set, then +the first value found will be used to authenticate requests to the GitHub API, +otherwise unauthenticated requests are used which are subject to stricter [rate +limiting](https://developer.github.com/v3/#rate-limiting). Unauthenticated +requests should be sufficient for most cases. + +!!! warning + + If you installed chezmoi using a package manager, the `upgrade` command + might have been removed by the package maintainer. diff --git a/assets/chezmoi.io/docs/reference/commands/verify.md b/assets/chezmoi.io/docs/reference/commands/verify.md new file mode 100644 index 00000000000..29693626308 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/commands/verify.md @@ -0,0 +1,16 @@ +# `verify` [*target*...] + +Verify that all *target*s match their target state. chezmoi exits with code 0 +(success) if all targets match their target state, or 1 (failure) otherwise. If +no targets are specified then all targets are checked. + +## `-i`, `--include` *types* + +Only include entries of type *types*. + +!!! example + + ```console + $ chezmoi verify + $ chezmoi verify ~/.bashrc + ``` diff --git a/assets/chezmoi.io/docs/reference/concepts.md b/assets/chezmoi.io/docs/reference/concepts.md new file mode 100644 index 00000000000..5c72b197aa2 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/concepts.md @@ -0,0 +1,26 @@ +# Concepts + +chezmoi evaluates the source state for the current machine and then updates the +destination directory, where: + +* The *source state* declares the desired state of your home directory, + including templates and machine-specific configuration. + +* The *source directory* is where chezmoi stores the source state, by default + `~/.local/share/chezmoi`. + +* The *target state* is the source state computed for the current machine. + +* The *destination directory* is the directory that chezmoi manages, by default + your home directory. + +* A *target* is a file, directory, or symlink in the destination directory. + +* The *destination state* is the current state of all the targets in the + destination directory. + +* The *config file* contains machine-specific configuration, by default it is + `~/.config/chezmoi/chezmoi.toml`. + +* The *working tree* is the git working tree. Normally it is the same as the + source directory, but can be a parent of the source directory. diff --git a/assets/chezmoi.io/docs/reference/configuration-file/editor.md b/assets/chezmoi.io/docs/reference/configuration-file/editor.md new file mode 100644 index 00000000000..fc3eb268fb6 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/configuration-file/editor.md @@ -0,0 +1,13 @@ +# Editor + +The editor used is the first non-empty string of the `edit.command` +configuration variable, the `$VISUAL` environment variable, the `$EDITOR` +environment variable. If none are set then chezmoi falls back to `notepad.exe` +on Windows systems and `vi` on non-Windows systems. + +When the `edit.command` configuration variable is used, extra arguments can be +passed to the editor with the `editor.args` configuration variable. + +chezmoi will emit a warning if the editor returns in less than +`edit.minDuration` (default `1s`). To disable this warning, set +`edit.minDuration` to `0`. diff --git a/assets/chezmoi.io/docs/reference/configuration-file/index.md b/assets/chezmoi.io/docs/reference/configuration-file/index.md new file mode 100644 index 00000000000..cb67e7b4d25 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/configuration-file/index.md @@ -0,0 +1,46 @@ +# Configuration file + +chezmoi searches for its configuration file according to the [XDG Base +Directory +Specification](https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) +and supports [JSON](https://www.json.org/json-en.html), +[TOML](https://github.com/toml-lang/toml), and [YAML](https://yaml.org/). The +basename of the config file is `chezmoi`, and the first config file found is +used. + +In most installations, the config file will be read from +`~/.config/chezmoi/chezmoi.<format>`, where `<format>` is one of `json`, +`toml`, or `yaml`. The config file can be set explicitly with the `--config` +command line option. By default, the format is detected based on the extension +of the config file name, but can be overridden with the `--config-format` +command line option. + + +## Examples + +=== "JSON" + + ```json title="~/.config/chezmoi/chezmoi.json" + { + "sourceDir": "/home/user/.dotfiles", + "git": { + "autoPush": true + } + } + ``` + +=== "TOML" + + ```toml title="~/.config/chezmoi/chezmoi.toml" + sourceDir = "/home/user/.dotfiles" + [git] + autoPush = true + ``` + +=== "YAML" + + ```yaml title="~/.config/chezmoi/chezmoi.yaml" + sourceDir: /home/user/.dotfiles + git: + autoPush: true + ``` diff --git a/assets/chezmoi.io/docs/reference/configuration-file/pinentry.md b/assets/chezmoi.io/docs/reference/configuration-file/pinentry.md new file mode 100644 index 00000000000..bebc53c5f6e --- /dev/null +++ b/assets/chezmoi.io/docs/reference/configuration-file/pinentry.md @@ -0,0 +1,23 @@ +# pinentry + +By default, chezmoi will request passwords from the terminal. + +If the `--no-tty` option is passed, then chezmoi will instead read passwords +from the standard input. + +Otherwise, if the configuration variable `pinentry.command` is set then chezmoi +will instead used the given command to read passwords, assuming that it follows +the [Assuan protocol](https://www.gnupg.org/documentation/manuals/assuan.pdf) +like [GnuPG's +pinentry](https://www.gnupg.org/related_software/pinentry/index.html). The +configuration variable `pinentry.args` specifies extra arguments to be passed +to `pinentry.command` and the configuration variable `pinentry.options` +specifies extra options to be set. The default `pinentry.options` is +`["allow-external-password-cache"]`. + +!!! example + + ```toml title="~/.config/chezmoi/chezmoi.toml" + [pinentry] + command = "pinentry" + ``` diff --git a/assets/chezmoi.io/docs/reference/configuration-file/umask.md b/assets/chezmoi.io/docs/reference/configuration-file/umask.md new file mode 100644 index 00000000000..54e00994dfe --- /dev/null +++ b/assets/chezmoi.io/docs/reference/configuration-file/umask.md @@ -0,0 +1,15 @@ +# umask + +By default, chezmoi uses your current umask as set by your operating system and +shell. chezmoi only stores crude permissions in its source state, namely in the +`executable` and `private` attributes, corresponding to the umasks of `0o111` +and `0o077` respectively. + +For machine-specific control of umask, set the `umask` configuration variable in +chezmoi's configuration file. + +!!! example + + ```toml title="~/.config/chezmoi/chezmoi.toml" + umask = 0o22 + ``` diff --git a/assets/chezmoi.io/docs/reference/configuration-file/variables.md b/assets/chezmoi.io/docs/reference/configuration-file/variables.md new file mode 100644 index 00000000000..d03d1e96e59 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/configuration-file/variables.md @@ -0,0 +1,71 @@ +# Variables + +The following configuration variables are available: + +| Section | Variable | Type | Default value | Description | +| -------------- | --------------------- | -------- | ------------------------ | ------------------------------------------------------ | +| Top level | `color` | string | `auto` | Colorize output | +| | `data` | any | *none* | Template data | +| | `destDir` | string | `~` | Destination directory | +| | `encryption` | string | *none* | Encryption tool, either `age` or `gpg` | +| | `format` | string | `json` | Format for data output, either `json` or `yaml` | +| | `mode` | string | `file` | Mode in target dir, either `file` or `symlink` | +| | `sourceDir` | string | `~/.local/share/chezmoi` | Source directory | +| | `pager` | string | `$PAGER` | Default pager | +| | `umask` | int | *from system* | Umask | +| | `useBuiltinAge` | string | `auto` | Use builtin age if `age` command is not found in $PATH | +| | `useBuiltinGit` | string | `auto` | Use builtin git if `git` command is not found in $PATH | +| | `verbose` | bool | `false` | Make output more verbose | +| | `workingTree` | string | *source directory* | git working tree directory | +| `add` | `templateSymlinks` | bool | `false` | Template symlinks to source and home dirs | +| `age` | `args` | []string | *none* | Extra args to age CLI command | +| | `command` | string | `age` | age CLI command | +| | `identity` | string | *none* | age identity file | +| | `identities` | []string | *none* | age identity files | +| | `passphrase` | bool | `false` | Use age passphrase instead of identity | +| | `recipient` | string | *none* | age recipient | +| | `recipients` | []string | *none* | age recipients | +| | `recipientsFile` | []string | *none* | age recipients file | +| | `recipientsFiles` | []string | *none* | age recipients files | +| | `suffix` | string | `.age` | Suffix appended to age-encrypted files | +| | `symmetric` | bool | `false` | Use age symmetric encryption | +| `bitwarden` | `command` | string | `bw` | Bitwarden CLI command | +| `cd` | `args` | []string | *none* | Extra args to shell in `cd` command | +| | `command` | string | *none* | Shell to run in `cd` command | +| `completion` | `custom` | bool | `false` | Enable custom shell completions | +| `diff` | `args` | []string | *see `diff` below* | Extra args to external diff command | +| | `command` | string | *none* | External diff command | +| | `exclude` | []string | *none* | Entry types to exclude from diffs | +| | `pager` | string | *none* | Diff-specific pager | +| `edit` | `args` | []string | *none* | Extra args to edit command | +| | `command` | string | `$EDITOR` / `$VISUAL` | Edit command | +| | `hardlink` | bool | `true` | Invoke editor with a hardlink to the source file | +| | `minDuration` | duration | `1s` | Minimum duration for edit command | +| `secret` | `command` | string | *none* | Generic secret command | +| `git` | `autoAdd ` | bool | `false` | Add changes to the source state after any change | +| | `autoCommit` | bool | `false` | Commit changes to the source state after any change | +| | `autoPush` | bool | `false` | Push changes to the source state after any change | +| | `command` | string | `git` | Source version control system | +| `gopass` | `command` | string | `gopass` | gopass CLI command | +| `gpg` | `args` | []string | *none* | Extra args to GPG CLI command | +| | `command` | string | `gpg` | GPG CLI command | +| | `recipient` | string | *none* | GPG recipient | +| | `suffix` | string | `.asc` | Suffix appended to GPG-encrypted files | +| | `symmetric` | bool | `false` | Use symmetric GPG encryption | +| `interpreters` | *extension*`.args` | []string | *none* | See section on "Scripts on Windows" | +| | *extension*`.command` | string | *special* | See section on "Scripts on Windows" | +| `keepassxc` | `args` | []string | *none* | Extra args to KeePassXC CLI command | +| | `command` | string | `keepassxc-cli` | KeePassXC CLI command | +| | `database` | string | *none* | KeePassXC database | +| `lastpass` | `command` | string | `lpass` | Lastpass CLI command | +| `merge` | `args` | []string | *see `merge` below* | Args to 3-way merge command | +| | `command` | string | `vimdiff` | 3-way merge command | +| `onepassword` | `cache` | bool | `true` | Enable optional caching provided by `op` | +| | `command` | string | `op` | 1Password CLI command | +| | `prompt` | bool | `true` | Prompt for sign-in when no valid session is available | +| `pass` | `command` | string | `pass` | Pass CLI command | +| `pinentry` | `args` | []string | *none* | Extra args to the pinentry command | +| | `command` | string | *none* | pinentry command | +| | `options` | []string | *see `pinentry` below* | Extra options for pinentry | +| `template` | `options` | []string | `["missingkey=error"]` | Template options | +| `vault` | `command` | string | `vault` | Vault CLI command | diff --git a/assets/chezmoi.io/docs/reference/index.md b/assets/chezmoi.io/docs/reference/index.md new file mode 100644 index 00000000000..7907d94fb4a --- /dev/null +++ b/assets/chezmoi.io/docs/reference/index.md @@ -0,0 +1,3 @@ +# Reference + +Manage your dotfiles across multiple machines, securely. diff --git a/assets/chezmoi.io/docs/reference/source-state-attributes.md b/assets/chezmoi.io/docs/reference/source-state-attributes.md new file mode 100644 index 00000000000..7ad1d6363e7 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/source-state-attributes.md @@ -0,0 +1,63 @@ +# Source state attributes + +chezmoi stores the source state of files, symbolic links, and directories in +regular files and directories in the source directory (`~/.local/share/chezmoi` +by default). This location can be overridden with the `-S` flag or by giving a +value for `sourceDir` in the configuration file. Directory targets are +represented as directories in the source state. All other target types are +represented as files in the source state. Some state is encoded in the source +names. + +The following prefixes and suffixes are special, and are collectively referred +to as "attributes": + +| Prefix | Effect | +| ------------- | ------------------------------------------------------------------------------ | +| `after_` | Run script after updating the destination | +| `before_` | Run script before updating the destination | +| `create_` | Ensure that the file exists, and create it with contents if it does not | +| `dot_` | Rename to use a leading dot, e.g. `dot_foo` becomes `.foo` | +| `empty_` | Ensure the file exists, even if is empty. By default, empty files are removed | +| `encrypted_` | Encrypt the file in the source state | +| `exact_` | Remove anything not managed by chezmoi | +| `executable_` | Add executable permissions to the target file | +| `literal_` | Stop parsing prefix attributes | +| `modify_` | Treat the contents as a script that modifies an existing file | +| `once_` | Only run the script if it has not been run before | +| `onchange_` | Only run the script if its contents have changed from the last time it was run | +| `private_` | Remove all group and world permissions from the target file or directory | +| `readonly_` | Remove all write permissions from the target file or directory | +| `remove_` | Remove the entry if it exists | +| `run_` | Treat the contents as a script to run | +| `symlink_` | Create a symlink instead of a regular file | + +| Suffix | Effect | +| ---------- | --------------------------------------------------- | +| `.literal` | Stop parsing suffix attributes | +| `.tmpl` | Treat the contents of the source file as a template | + +Different target types allow different prefixes and suffixes. The order of +prefixes is important. + +| Target type | Source type | Allowed prefixes in order | Allowed suffixes | +| ------------- | ----------- | ----------------------------------------------------------------------- | ---------------- | +| Directory | Directory | `exact_`, `private_`, `readonly_`, `dot_` | *none* | +| Regular file | File | `encrypted_`, `private_`, `executable_`, `dot_` | `.tmpl` | +| Create file | File | `create_`, `encrypted_`, `private_`, `readonly_`, `executable_`, `dot_` | `.tmpl` | +| Modify file | File | `modify_`, `encrypted_`, `private_`, `readonly_`, `executable_`, `dot_` | `.tmpl` | +| Remove | File | `remove_`, `dot_` | *none* | +| Script | File | `run_`, `once_` or `onchange_`, `before_` or `after_` | `.tmpl` | +| Symbolic link | File | `symlink_`, `dot_` | `.tmpl` | + +The `literal_` prefix and `.literal` suffix can appear anywhere and stop +attribute parsing. This permits filenames that would otherwise conflict with +chezmoi's attributes to be represented. + +In addition, if the source file is encrypted, the suffix `.age` (when age +encryption is used) or `.asc` (when gpg encryption is used) is stripped. These +suffixes can be overridden with the `age.suffix` and `gpg.suffix` configuration +variables. + +chezmoi ignores all files and directories in the source directory that begin +with a `.` with the exception of files and directories that begin with +`.chezmoi`. diff --git a/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoi-format-tmpl.md b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoi-format-tmpl.md new file mode 100644 index 00000000000..6c021ebd448 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoi-format-tmpl.md @@ -0,0 +1,14 @@ +# `.chezmoi.<format>.tmpl` + +If a file called `.chezmoi.<format>.tmpl` exists then `chezmoi init` will use +it to create an initial config file. `<format>` must be one of the the +supported config file formats, e.g. `json`, `toml`, or `yaml`. + +!!! example + + ``` title="~/.local/share/chezmoi/.chezmoi.yaml.tmpl" + {{ $email := promptString "email" -}} + + data: + email: {{ $email | quote }} + ``` diff --git a/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoidata-format.md b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoidata-format.md new file mode 100644 index 00000000000..f75dbea1198 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoidata-format.md @@ -0,0 +1,38 @@ +# `.chezmoidata.<format>` + +If a file called `.chezmoidata.<format>` exists in the source state, it is +interpreted as a datasource available in most templates. + +!!! example + + If `.chezmoidata.toml` contains the following (and no variable is + overwritten in later stages): + + ```toml title="~/.local/share/chezmoi/.chezmoidata.toml" + editor = "nvim" + [directions] + up = "k" + down = "j" + right = "l" + left = "h" + ``` + + Then the following template: + + ``` + EDITOR={{ .editor }} + MOVE_UP={{ .directions.up }} + MOVE_DOWN={{ .directions.down }} + MOVE_RIGHT={{ .directions.right }} + MOVE_LEFT={{ .directions.left }} + ``` + + Will result in: + + ``` + EDITOR=nvim + MOVE_UP=k + MOVE_DOWN=j + MOVE_RIGHT=l + MOVE_LEFT=h + ``` diff --git a/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiexternal-format.md b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiexternal-format.md new file mode 100644 index 00000000000..55ba650484d --- /dev/null +++ b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiexternal-format.md @@ -0,0 +1,86 @@ +# `.chezmoiexternal.<format>` + +If a file called `.chezmoiexternal.<format>` exists in the source state, it is +interpreted as a list of external files and archives to be included as if they +were in the source state. + +`<format>` must be one of chezmoi's supported configuration file formats, e.g. +`json`, `toml`, or `yaml`. + +`.chezmoiexternal.<format>` is interpreted as a template. This allows different +externals to be included on different machines. + +Entries are indexed by target name relative to the directory of the +`.chezmoiexternal.<format>` file, and must have a `type` and a `url` field. +`type` can be either `file` or `archive`. If the entry's parent directories do +not already exist in the source state then chezmoi will create them as regular +directories. + +Entries may have the following fields: + +| Variable | Type | Default value | Description | +| ----------------- | -------- | ------------- | ------------------------------------------------------------- | +| `type` | string | *none* | External type (`file` or `archive`) | +| `encrypted` | bool | `false` | Whether the external is encrypted | +| `exact` | bool | `false` | Add `exact_` attribute to directories in archive | +| `executable` | bool | `false` | Add `executable_` attribute to file | +| `filter.command` | string | *none* | Command to filter contents | +| `filter.args` | []string | *none* | Extra args to command to filter contents | +| `format` | string | *autodetect* | Format of archive | +| `refreshPeriod` | duration | `0` | Refresh period | +| `stripComponents` | int | `0` | Number of leading directory components to strip from archives | +| `url` | string | *none* | URL | + +The optional boolean `encrypted` field specifies whether the file or archive is +encrypted. + +If optional string `filter.command` and array of strings `filter.args` are +specified, the the file or archive is filtered by piping it into the command's +standard input and reading the command's standard output. + +If `type` is `file` then the target is a file with the contents of `url`. The +optional boolean field `executable` may be set, in which case the target file +will be executable. + +If `type` is `archive` then the target is a directory with the contents of the +archive at `url`. The optional boolean field `exact` may be set, in which case +the directory and all subdirectories will be treated as exact directories, i.e. +`chezmoi apply` will remove entries not present in the archive. The optional +integer field `stripComponents` will remove leading path components from the +members of archive. The optional string field `format` sets the archive format. +The supported archive formats are `tar`, `tar.gz`, `tgz`, `tar.bz2`, `tbz2`, +and `zip`. If `format` is not specified then chezmoi will guess the format +using firstly the path of the URL and secondly its contents. + +By default, chezmoi will cache downloaded URLs. The optional duration +`refreshPeriod` field specifies how often chezmoi will re-download the URL. The +default is zero meaning that chezmoi will never re-download unless forced. To +force chezmoi to re-download URLs, pass the `-R`/`--refresh-externals` flag. +Suitable refresh periods include one day (`24h`), one week (`168h`), or four +weeks (`672h`). + +!!! example + + ```toml title="~/.local/share/chezmoi/.chezmoiexternal.toml" + [".vim/autoload/plug.vim"] + type = "file" + url = "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" + refreshPeriod = "168h" + [".oh-my-zsh"] + type = "archive" + url = "https://github.com/ohmyzsh/ohmyzsh/archive/master.tar.gz" + exact = true + stripComponents = 1 + refreshPeriod = "168h" + [".oh-my-zsh/custom/plugins/zsh-syntax-highlighting"] + type = "archive" + url = "https://github.com/zsh-users/zsh-syntax-highlighting/archive/master.tar.gz" + exact = true + stripComponents = 1 + refreshPeriod = "168h" + [".oh-my-zsh/custom/themes/powerlevel10k"] + type = "archive" + url = "https://github.com/romkatv/powerlevel10k/archive/v1.15.0.tar.gz" + exact = true + stripComponents = 1 + ``` diff --git a/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiignore.md b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiignore.md new file mode 100644 index 00000000000..63708a336b4 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiignore.md @@ -0,0 +1,41 @@ +# `.chezmoiignore` + +If a file called `.chezmoiignore` exists in the source state then it is +interpreted as a set of patterns to ignore. Patterns are matched using +[`doublestar.Match`](https://pkg.go.dev/github.com/bmatcuk/doublestar/v4#Match) +and match against the target path, not the source path. + +Patterns can be excluded by prefixing them with a `!` character. All excludes +take priority over all includes. + +Comments are introduced with the `#` character and run until the end of the +line. + +`.chezmoiignore` is interpreted as a template. This allows different files to +be ignored on different machines. + +`.chezmoiignore` files in subdirectories apply only to that subdirectory. + +!!! example + + ``` title="~/.local/share/chezmoi/.chezmoiignore" + README.md + + *.txt # ignore *.txt in the target directory + */*.txt # ignore *.txt in subdirectories of the target directory + # but not in subdirectories of subdirectories; + # so a/b/c.txt would *not* be ignored + + backups/ # ignore backups folder in chezmoi directory and all its contents + backups/** # ignore all contents of backups folder in chezmoi directory + # but not backups folder itself + + {{- if ne .email "[email protected]" }} + # Ignore .company-directory unless configured with a company email + .company-directory # note that the pattern is not dot_company-directory + {{- end }} + + {{- if ne .email "[email protected] }} + .personal-file + {{- end }} + ``` diff --git a/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiremove.md b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiremove.md new file mode 100644 index 00000000000..c93ebabbeb3 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiremove.md @@ -0,0 +1,5 @@ +# `.chezmoiremove` + +If a file called `.chezmoiremove` exists in the source state then it is +interpreted as a list of targets to remove. `.chezmoiremove` is interpreted as +a template. diff --git a/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiroot.md b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiroot.md new file mode 100644 index 00000000000..7bf27f34e79 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiroot.md @@ -0,0 +1,6 @@ +# `.chezmoiroot` + +If a file called `.chezmoiroot` exists in the root of the source directory then +the source state is read from the directory specified in `.chezmoiroot` +interpreted as a relative path to the source directory. `.chezmoiroot` is read +before all other files in the source directory. diff --git a/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiscripts.md b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiscripts.md new file mode 100644 index 00000000000..5b24128d47c --- /dev/null +++ b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiscripts.md @@ -0,0 +1,5 @@ +# `.chezmoiscripts` + +If a directory called `.chezmoiscripts` exists in the root of the source +directory then any scripts in it are executed as normal scripts without +creating a corresponding directory in the target state. diff --git a/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoitemplates.md b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoitemplates.md new file mode 100644 index 00000000000..ffd78149b8e --- /dev/null +++ b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoitemplates.md @@ -0,0 +1,24 @@ +# `.chezmoitemplates` + +If a directory called `.chezmoitemplates` exists, then all files in this +directory are parsed as templates are available as templates with a name equal +to the relative path to the `.chezmoitemplates` directory. + +The [`template` action](https://pkg.go.dev/text/template#hdr-Actions) can be +used to include these templates in another template. The value of `.` must be +set explicitly if needed, otherwise the template will be executed with `nil` +data. + +!!! example + + Given: + + ``` title="~/.local/share/chezmoi/.chezmoitemplates/foo" + {{ if true }}bar{{ end }} + ``` + + ``` title="~/.local/share/chezmoi/dot_file.tmpl" + {{ template "foo" . }} + ``` + + The target state of `.file` will be `bar`. diff --git a/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiversion.md b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiversion.md new file mode 100644 index 00000000000..30e88b23aad --- /dev/null +++ b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiversion.md @@ -0,0 +1,12 @@ +# `.chezmoiversion` + +If a file called `.chezmoiversion` exists, then its contents are interpreted as +a semantic version defining the minimum version of chezmoi required to +interpret the source state correctly. chezmoi will refuse to interpret the +source state if the current version is too old. + +!!! example + + ``` title="~/.local/share/chezmoi/.chezmoiversion" + 1.5.0 + ``` diff --git a/assets/chezmoi.io/docs/reference/special-files-and-directories/index.md b/assets/chezmoi.io/docs/reference/special-files-and-directories/index.md new file mode 100644 index 00000000000..fa98ddc6d3a --- /dev/null +++ b/assets/chezmoi.io/docs/reference/special-files-and-directories/index.md @@ -0,0 +1,6 @@ +# Special files and directories + +All files and directories in the source state whose name begins with `.` are +ignored by default, unless they are one of the special files listed here. +`.chezmoidata.<format>` and `.chezmoitemplates` are read before all other files +so that they can be used in templates. diff --git a/assets/chezmoi.io/docs/reference/target-types.md b/assets/chezmoi.io/docs/reference/target-types.md new file mode 100644 index 00000000000..9fdec650822 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/target-types.md @@ -0,0 +1,132 @@ +# Target types + +chezmoi will create, update, and delete files, directories, and symbolic links +in the destination directory, and run scripts. chezmoi deterministically +performs actions in ASCII order of their target name. + +!!! example + + Given a file `dot_a`, a script `run_z`, and a directory `exact_dot_c`, chezmoi + will first create `.a`, create `.c`, and then execute `run_z`. + +## Files + +Files are represented by regular files in the source state. The `encrypted_` +attribute determines whether the file in the source state is encrypted. The +`executable_` attribute will set the executable bits in the the target state, +and the `private_` attribute will clear all group and world permissions. The +`readonly_` attribute will clear all write permission bits in the target state. +Files with the `.tmpl` suffix will be interpreted as templates. If the target +contents are empty then the file will be removed, unless it has an `empty_` +prefix. + +### Create file + +Files with the `create_` prefix will be created in the target state with the +contents of the file in the source state if they do not already exist. If the +file in the destination state already exists then its contents will be left +unchanged. + +### Modify file + +Files with the `modify_` prefix are treated as scripts that modify an existing +file. The contents of the existing file (which maybe empty if the existing file +does not exist or is empty) are passed to the script's standard input, and the +new contents are read from the scripts standard output. + +### Remove entry + +Files with the `remove_` prefix will cause the corresponding entry (file, +directory, or symlink) to be removed in the target state. + +## Directories + +Directories are represented by regular directories in the source state. The +`exact_` attribute causes chezmoi to remove any entries in the target state that +are not explicitly specified in the source state, and the `private_` attribute +causes chezmoi to clear all group and world permissions. The `readonly_` +attribute will clear all write permission bits. + +## Symbolic links + +Symbolic links are represented by regular files in the source state with the +prefix `symlink_`. The contents of the file will have a trailing newline +stripped, and the result be interpreted as the target of the symbolic link. +Symbolic links with the `.tmpl` suffix in the source state are interpreted as +templates. If the target of the symbolic link is empty or consists only of +whitespace, then the target is removed. + +## Scripts + +Scripts are represented as regular files in the source state with prefix `run_`. +The file's contents (after being interpreted as a template if it has a `.tmpl` +suffix) are executed. + +Scripts are executed on every `chezmoi apply`, unless they have the `once_` or +`onchange_` attribute. `run_once_` scripts are only executed if a script with +the same contents has not been run before, i.e. if the script is new or if its +contents have changed. `run_onchange_` scripts are executed whenever their +contents change, even if a script with the same contents has run before. + +Scripts with the `before_` attribute are executed before any files, directories, +or symlinks are updated. Scripts with the `after_` attribute are executed after +all files, directories, and symlinks have been updated. Scripts without an +`before_` or `after_` attribute are executed in ASCII order of their target +names with respect to files, directories, and symlinks. + +Scripts will normally run with their working directory set to their equivalent +location in the destination directory. If the equivalent location in the +destination directory either does not exist or is not a directory, then chezmoi +will walk up the script's directory hierarchy and run the script in the first +directory that exists and is a directory. + +!!! example + + A script in `~/.local/share/chezmoi/dir/run_script` will be run with a working + directory of `~/dir`. + +### Scripts on Windows + +<!-- FIXME: some of the following needs to be moved to the how-to --> + +The execution of scripts on Windows depends on the script's file extension. +Windows will natively execute scripts with a `.bat`, `.cmd`, `.com`, and `.exe` +extensions. Other extensions require an interpreter, which must be in your +`%PATH%`. + +The default script interpreters are: + +| Extension | Command | Arguments | +| --------- | ------------ | --------- | +| `.pl` | `perl` | *none* | +| `.py` | `python` | *none* | +| `.ps1` | `powershell` | `-NoLogo` | +| `.rb` | `ruby` | *none* | + +Script interpreters can be added or overridden with the +`interpreters.`*extension* section in the configuration file. Note that the +leading `.` is dropped from *extension*. + +!!! example + + To change the Python interpreter to `C:\Python39\python.exe` and add a + Tcl/Tk interpreter, include the following in your config file: + + ```toml title="~/.config/chezmoi/chezmoi.toml" + [interpreters.py] + command = 'C:\Python39\python.exe' + [interpreters.tcl] + command = "tclsh" + ``` + +If the script in the source state is a template (with a `.tmpl` extension), then +chezmoi will strip the `.tmpl` extension and use the next remaining extension to +determine the interpreter to use. + +## `symlink` mode + +By default, chezmoi will create regular files and directories. Setting `mode = +"symlink"` will make chezmoi behave more like a dotfile manager that uses +symlinks by default, i.e. `chezmoi apply` will make dotfiles symlinks to files +in the source directory if the target is a regular file and is not +encrypted, executable, private, or a template. diff --git a/assets/chezmoi.io/docs/reference/templates/functions/bitwarden.md b/assets/chezmoi.io/docs/reference/templates/functions/bitwarden.md new file mode 100644 index 00000000000..52b75ca1293 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/bitwarden.md @@ -0,0 +1,15 @@ +# `bitwarden` [*arg*...] + +`bitwarden` returns structured data retrieved from +[Bitwarden](https://bitwarden.com) using the [Bitwarden +CLI](https://github.com/bitwarden/cli) (`bw`). *arg*s are passed to `bw get` +unchanged and the output from `bw get` is parsed as JSON. The output from `bw +get` is cached so calling `bitwarden` multiple times with the same arguments +will only invoke `bw` once. + +!!! example + + ``` + username = {{ (bitwarden "item" "<itemid>").login.username }} + password = {{ (bitwarden "item" "<itemid>").login.password }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/bitwardenAttachment.md b/assets/chezmoi.io/docs/reference/templates/functions/bitwardenAttachment.md new file mode 100644 index 00000000000..b6e56f008b1 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/bitwardenAttachment.md @@ -0,0 +1,15 @@ +# `bitwardenAttachment` *filename* *itemid* + +`bitwardenAttachment` returns a document from +[Bitwarden](https://bitwarden.com/) using the [Bitwarden +CLI](https://bitwarden.com/help/article/cli/) (`bw`). *filename* and *itemid* +is passed to `bw get attachment <filename> --itemid <itemid>` and the output +from `bw` is returned. The output from `bw` is cached so calling +`bitwardenAttachment` multiple times with the same *filename* and *itemid* will +only invoke `bw` once. + +!!! example + + ``` + {{- (bitwardenAttachment "<filename>" "<itemid>") -}} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/bitwardenFields.md b/assets/chezmoi.io/docs/reference/templates/functions/bitwardenFields.md new file mode 100644 index 00000000000..90a3088e36a --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/bitwardenFields.md @@ -0,0 +1,70 @@ +# `bitwardenFields` [*arg*...] + +`bitwardenFields` returns structured data retrieved from +[Bitwarden](https://bitwarden.com) using the [Bitwarden +CLI](https://github.com/bitwarden/cli) (`bw`). *arg*s are passed to `bw get` +unchanged, the output from `bw get` is parsed as JSON, and elements of `fields` +are returned as a map indexed by each field's `name`. + +The output from `bw get` is cached so calling `bitwarden` multiple times with +the same arguments will only invoke `bw get` once. + +!!! example + + ``` + {{ (bitwardenFields "item" "<itemid>").token.value }} + ``` + +!!! example + + Given the output from `bw get`: + + ```json + { + "object": "item", + "id": "bf22e4b4-ae4a-4d1c-8c98-ac620004b628", + "organizationId": null, + "folderId": null, + "type": 1, + "name": "example.com", + "notes": null, + "favorite": false, + "fields": [ + { + "name": "text", + "value": "text-value", + "type": 0 + }, + { + "name": "hidden", + "value": "hidden-value", + "type": 1 + } + ], + "login": { + "username": "username-value", + "password": "password-value", + "totp": null, + "passwordRevisionDate": null + }, + "collectionIds": [], + "revisionDate": "2020-10-28T00:21:02.690Z" + } + ``` + + the return value if `bitwardenFields` will be the map: + + ```json + { + "hidden": { + "name": "hidden", + "type": 1, + "value": "hidden-value" + }, + "token": { + "name": "token", + "type": 0, + "value": "token-value" + } + } + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/decrypt.md b/assets/chezmoi.io/docs/reference/templates/functions/decrypt.md new file mode 100644 index 00000000000..99788348baf --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/decrypt.md @@ -0,0 +1,9 @@ +# `decrypt` *ciphertext* + +`decrypt` decrypts *ciphertext* using chezmoi's configured encryption method. + +!!! example + + ``` + {{ joinPath .chezmoi.sourceDir ".ignored-encrypted-file.age" | include | decrypt }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/encrypt.md b/assets/chezmoi.io/docs/reference/templates/functions/encrypt.md new file mode 100644 index 00000000000..23a0e0a3324 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/encrypt.md @@ -0,0 +1,3 @@ +# `encrypt` *plaintext* + +`encrypt` encrypts *plaintext* using chezmoi's configured encryption method. diff --git a/assets/chezmoi.io/docs/reference/templates/functions/exit.md b/assets/chezmoi.io/docs/reference/templates/functions/exit.md new file mode 100644 index 00000000000..4ebfd500094 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/exit.md @@ -0,0 +1,8 @@ +# `exit` *code* + +`exit` stops template execution and causes chezmoi to exit with *code*. `exit` +is only available when generating the initial config file + +!!! warning + + `exit` is not available when chezmoi is built with Go 1.16 or earlier. diff --git a/assets/chezmoi.io/docs/reference/templates/functions/fromYaml.md b/assets/chezmoi.io/docs/reference/templates/functions/fromYaml.md new file mode 100644 index 00000000000..f8ebd9a4002 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/fromYaml.md @@ -0,0 +1,9 @@ +# `fromYaml` *yamltext* + +`fromYaml` returns the parsed value of *yamltext*. + +!!! example + + ``` + {{ (fromYaml "key1: value\nkey2: value").key2 }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/gitHubKeys.md b/assets/chezmoi.io/docs/reference/templates/functions/gitHubKeys.md new file mode 100644 index 00000000000..e38e69e316f --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/gitHubKeys.md @@ -0,0 +1,37 @@ +# `gitHubKeys` *user* + +`gitHubKeys` returns *user*'s public SSH keys from GitHub using the GitHub API. +The returned value is a slice of structs with `.ID` and `.Key` fields. + +!!! warning + + If you use this function to populate your `~/.ssh/authorized_keys` file + then you potentially open SSH access to anyone who is able to modify or add + to your GitHub public SSH keys, possibly including certain GitHub + employees. You should not use this function on publicly-accessible machines + and should always verify that no unwanted keys have been added, for example + by using the `-v` / `--verbose` option when running `chezmoi apply` or + `chezmoi update`. + +By default, an anonymous GitHub API request will be made, which is subject to +[GitHub's rate +limits](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting) +(currently 60 requests per hour per source IP address). If any of the +environment variables `$CHEZMOI_GITHUB_ACCESS_TOKEN`, `$GITHUB_ACCESS_TOKEN`, +or `$GITHUB_TOKEN` are found, then the first one found will be used to +authenticate the GitHub API request, with a higher rate limit (currently 5,000 +requests per hour per user). + +In practice, GitHub API rate limits are high enough that you should rarely need +to set a token, unless you are sharing a source IP address with many other +GitHub users. If needed, the GitHub documentation describes how to [create a +personal access +token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). + +!!! example + + ``` + {{ range (gitHubKeys "user") }} + {{- .Key }} + {{ end }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/gitHubLatestRelease.md b/assets/chezmoi.io/docs/reference/templates/functions/gitHubLatestRelease.md new file mode 100644 index 00000000000..ff02288479c --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/gitHubLatestRelease.md @@ -0,0 +1,17 @@ +# `gitHubLatestRelease` *user-repo* + +`gitHubLatestRelease` calls the GitHub API to retrieve the latest release about +the given *user-repo*, returning structured data as defined by the [GitHub Go +API +bindings](https://pkg.go.dev/github.com/google/go-github/v41/github#RepositoryRelease). + +Calls to `gitHubLatestRelease` are cached so calling `gitHubLatestRelease` with +the same *user-repo* will only result in one call to the GitHub API. + +`gitHubLatestRelease` uses the same API request mechanism as `gitHubKeys`. + +!!! example + + ``` + {{ (gitHubLatestRelease "docker/compose").TagName }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/gopass.md b/assets/chezmoi.io/docs/reference/templates/functions/gopass.md new file mode 100644 index 00000000000..6d5b109d68d --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/gopass.md @@ -0,0 +1,14 @@ +# `gopass` *gopass-name* + +`gopass` returns passwords stored in [gopass](https://www.gopass.pw/) using the +gopass CLI (`gopass`). *gopass-name* is passed to `gopass show --password +<gopass-name>` and the first line of the output of `gopass` is returned with the +trailing newline stripped. The output from `gopass` is cached so calling +`gopass` multiple times with the same *gopass-name* will only invoke `gopass` +once. + +!!! example + + ``` + {{ gopass "<pass-name>" }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/gopassRaw.md b/assets/chezmoi.io/docs/reference/templates/functions/gopassRaw.md new file mode 100644 index 00000000000..a6da7a3b30e --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/gopassRaw.md @@ -0,0 +1,7 @@ +# `gopassRaw` *gopass-name* + +`gopass` returns raw passwords stored in [gopass](https://www.gopass.pw/) using +the gopass CLI (`gopass`). *gopass-name* is passed to `gopass show --noparsing +<gopass-name>` and the output is returned. The output from `gopassRaw` is +cached so calling `gopassRaw` multiple times with the same *gopass-name* will +only invoke `gopass` once. diff --git a/assets/chezmoi.io/docs/reference/templates/functions/include.md b/assets/chezmoi.io/docs/reference/templates/functions/include.md new file mode 100644 index 00000000000..5d751061056 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/include.md @@ -0,0 +1,4 @@ +# `include` *filename* + +`include` returns the literal contents of the file named `*filename*`. Relative +paths are interpreted relative to the source directory. diff --git a/assets/chezmoi.io/docs/reference/templates/functions/index.md b/assets/chezmoi.io/docs/reference/templates/functions/index.md new file mode 100644 index 00000000000..b571f59031c --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/index.md @@ -0,0 +1,5 @@ +# Functions + +All standard [`text/template`](https://pkg.go.dev/text/template) and [text +template functions from `sprig`](http://masterminds.github.io/sprig/) are +included. chezmoi provides some additional functions. diff --git a/assets/chezmoi.io/docs/reference/templates/functions/ioreg.md b/assets/chezmoi.io/docs/reference/templates/functions/ioreg.md new file mode 100644 index 00000000000..ec62c0cb5f7 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/ioreg.md @@ -0,0 +1,17 @@ +# `ioreg` + +On macOS, `ioreg` returns the structured output of the `ioreg -a -l` command, +which includes detailed information about the I/O Kit registry. + +On non-macOS operating systems, `ioreg` returns `nil`. + +The output from `ioreg` is cached so multiple calls to the `ioreg` function +will only execute the `ioreg -a -l` command once. + +!!! example + + ``` + {{ if (eq .chezmoi.os "darwin") }} + {{ $serialNumber := index ioreg "IORegistryEntryChildren" 0 "IOPlatformSerialNumber" }} + {{ end }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/joinPath.md b/assets/chezmoi.io/docs/reference/templates/functions/joinPath.md new file mode 100644 index 00000000000..9ab4263abab --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/joinPath.md @@ -0,0 +1,13 @@ +# `joinPath` *element*... + +`joinPath` joins any number of path elements into a single path, separating +them with the OS-specific path separator. Empty elements are ignored. The +result is cleaned. If the argument list is empty or all its elements are empty, +`joinPath` returns an empty string. On Windows, the result will only be a UNC +path if the first non-empty element is a UNC path. + +!!! example + + ``` + {{ joinPath .chezmoi.homeDir ".zshrc" }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/keepassxc.md b/assets/chezmoi.io/docs/reference/templates/functions/keepassxc.md new file mode 100644 index 00000000000..0e5de70a619 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/keepassxc.md @@ -0,0 +1,18 @@ +# `keepassxc` *entry* + +`keepassxc` returns structured data retrieved from a +[KeePassXC](https://keepassxc.org/) database using the KeePassXC CLI +(`keepassxc-cli`). The database is configured by setting `keepassxc.database` +in the configuration file. *database* and *entry* are passed to `keepassxc-cli +show`. You will be prompted for the database password the first time +`keepassxc-cli` is run, and the password is cached, in plain text, in memory +until chezmoi terminates. The output from `keepassxc-cli` is parsed into +key-value pairs and cached so calling `keepassxc` multiple times with the same +*entry* will only invoke `keepassxc-cli` once. + +!!! example + + ``` + username = {{ (keepassxc "example.com").UserName }} + password = {{ (keepassxc "example.com").Password }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/keepassxcAttribute.md b/assets/chezmoi.io/docs/reference/templates/functions/keepassxcAttribute.md new file mode 100644 index 00000000000..1b2f8ad3332 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/keepassxcAttribute.md @@ -0,0 +1,12 @@ +# `keepassxcAttribute` *entry* *attribute* + +`keepassxcAttribute` returns the attribute *attribute* of *entry* using +`keepassxc-cli`, with any leading or trailing whitespace removed. It behaves +identically to the `keepassxc` function in terms of configuration, password +prompting, password storage, and result caching. + +!!! example + + ``` + {{ keepassxcAttribute "SSH Key" "private-key" }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/keyring.md b/assets/chezmoi.io/docs/reference/templates/functions/keyring.md new file mode 100644 index 00000000000..ca2da09d701 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/keyring.md @@ -0,0 +1,18 @@ +# `keyring` *service* *user* + +`keyring` retrieves the value associated with *service* and *user* from the +user's keyring. + +| OS | Keyring | +| ------- | --------------------------- | +| macOS | Keychain | +| Linux | GNOME Keyring | +| Windows | Windows Credentials Manager | + +!!! example + + ``` + [github] + user = {{ .github.user | quote }} + token = {{ keyring "github" .github.user | quote }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/lastpass.md b/assets/chezmoi.io/docs/reference/templates/functions/lastpass.md new file mode 100644 index 00000000000..f4d3015af67 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/lastpass.md @@ -0,0 +1,17 @@ +# `lastpass` *id* + +`lastpass` returns structured data from [LastPass](https://lastpass.com) using +the [LastPass CLI](https://lastpass.github.io/lastpass-cli/lpass.1.html) +(`lpass`). *id* is passed to `lpass show --json <id>` and the output from +`lpass` is parsed as JSON. In addition, the `note` field, if present, is +further parsed as colon-separated key-value pairs. The structured data is an +array so typically the `index` function is used to extract the first item. The +output from `lastpass` is cached so calling `lastpass` multiple times with the +same *id* will only invoke `lpass` once. + +!!! example + + ``` + githubPassword = {{ (index (lastpass "GitHub") 0).password | quote }} + {{ (index (lastpass "SSH") 0).note.privateKey }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/lastpassRaw.md b/assets/chezmoi.io/docs/reference/templates/functions/lastpassRaw.md new file mode 100644 index 00000000000..35c872cbfca --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/lastpassRaw.md @@ -0,0 +1,12 @@ +# `lastpassRaw` *id* + +`lastpassRaw` returns structured data from [LastPass](https://lastpass.com) +using the [LastPass CLI](https://lastpass.github.io/lastpass-cli/lpass.1.html) +(`lpass`). It behaves identically to the `lastpass` function, except that no +further parsing is done on the `note` field. + +!!! example + + ``` + {{ (index (lastpassRaw "SSH Private Key") 0).note }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/lookPath.md b/assets/chezmoi.io/docs/reference/templates/functions/lookPath.md new file mode 100644 index 00000000000..7acb26b7917 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/lookPath.md @@ -0,0 +1,19 @@ +# `lookPath` *file* + +`lookPath` searches for an executable named *file* in the directories named by +the `PATH` environment variable. If file contains a slash, it is tried directly +and the `PATH` is not consulted. The result may be an absolute path or a path +relative to the current directory. If *file* is not found, `lookPath` returns +an empty string. + +`lookPath` is not hermetic: its return value depends on the state of the +environment and the filesystem at the moment the template is executed. Exercise +caution when using it in your templates. + +!!! example + + ``` + {{ if lookPath "diff-so-fancy" }} + # diff-so-fancy is in $PATH + {{ end }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/mozillaInstallHash.md b/assets/chezmoi.io/docs/reference/templates/functions/mozillaInstallHash.md new file mode 100644 index 00000000000..0c5b55425d1 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/mozillaInstallHash.md @@ -0,0 +1,4 @@ +# `mozillaInstallHash` *path* + +`mozillaInstallHash` returns the Mozilla install hash for *path*. This is a +convenience function to assist the management of Firefox profiles. diff --git a/assets/chezmoi.io/docs/reference/templates/functions/onepassword.md b/assets/chezmoi.io/docs/reference/templates/functions/onepassword.md new file mode 100644 index 00000000000..29047e89c9c --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/onepassword.md @@ -0,0 +1,23 @@ +# `onepassword` *uuid* [*vault-uuid* [*account-name*]] + +`onepassword` returns structured data from [1Password](https://1password.com/) +using the [1Password +CLI](https://support.1password.com/command-line-getting-started/) (`op`). +*uuid* is passed to `op get item <uuid>` and the output from `op` is parsed as +JSON. The output from `op` is cached so calling `onepassword` multiple times +with the same *uuid* will only invoke `op` once. If the optional *vault-uuid* +is supplied, it will be passed along to the `op get` call, which can +significantly improve performance. If the optional *account-name* is supplied, +it will be passed along to the `op get` call, which will help it look in the +right account, in case you have multiple accounts (eg. personal and work +accounts). If there is no valid session in the environment, by default you will +be interactively prompted to sign in. + +!!! example + + ``` + {{ (onepassword "<uuid>").details.password }} + {{ (onepassword "<uuid>" "<vault-uuid>").details.password }} + {{ (onepassword "<uuid>" "<vault-uuid>" "<account-name>").details.password }} + {{ (onepassword "<uuid>" "" "<account-name>").details.password }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/onepasswordDetailsFields.md b/assets/chezmoi.io/docs/reference/templates/functions/onepasswordDetailsFields.md new file mode 100644 index 00000000000..a5996dcb57d --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/onepasswordDetailsFields.md @@ -0,0 +1,71 @@ +# `onepasswordDetailsFields` *uuid* [*vault-uuid* [*account-name*]] + +`onepasswordDetailsFields` returns structured data from +[1Password](https://1password.com/) using the [1Password +CLI](https://support.1password.com/command-line-getting-started/) (`op`). +*uuid* is passed to `op get item <uuid>`, the output from `op` is parsed as +JSON, and elements of `details.fields` are returned as a map indexed by each +field's `designation`. If there is no valid session in the environment, by +default you will be interactively prompted to sign in. + +The output from `op` is cached so calling `onepasswordDetailsFields` multiple +times with the same *uuid* will only invoke `op` once. If the optional +*vault-uuid* is supplied, it will be passed along to the `op get` call, which +can significantly improve performance. If the optional *account-name* is +supplied, it will be passed along to the `op get` call, which will help it look +in the right account, in case you have multiple accounts (eg. personal and work +accounts). + +!!! example + + ``` + {{ (onepasswordDetailsFields "<uuid>").password.value }} + {{ (onepasswordDetailsFields "<uuid>" "<vault-uuid>").password.value }} + {{ (onepasswordDetailsFields "<uuid>" "<vault-uuid>" "<account-name>").password.value }} + {{ (onepasswordDetailsFields "<uuid>" "" "<account-name>").password.value }} + ``` + +!!! example + + Given the output from `op`: + + ```json + { + "uuid": "<uuid>", + "details": { + "fields": [ + { + "designation": "username", + "name": "username", + "type": "T", + "value": "exampleuser" + }, + { + "designation": "password", + "name": "password", + "type": "P", + "value": "examplepassword" + } + ] + } + } + ``` + + the return value of `onepasswordDetailsFields` will be the map: + + ```json + { + "username": { + "designation": "username", + "name": "username", + "type": "T", + "value": "exampleuser" + }, + "password": { + "designation": "password", + "name": "password", + "type": "P", + "value": "examplepassword" + } + } + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/onepasswordDocument.md b/assets/chezmoi.io/docs/reference/templates/functions/onepasswordDocument.md new file mode 100644 index 00000000000..80d29e82a7d --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/onepasswordDocument.md @@ -0,0 +1,23 @@ +# `onepasswordDocument` *uuid* [*vault-uuid* [*account-name*]] + +`onepassword` returns a document from [1Password](https://1password.com/) using +the [1Password +CLI](https://support.1password.com/command-line-getting-started/) (`op`). +*uuid* is passed to `op get document <uuid>` and the output from `op` is +returned. The output from `op` is cached so calling `onepasswordDocument` +multiple times with the same *uuid* will only invoke `op` once. If the +optional *vault-uuid* is supplied, it will be passed along to the `op get` +call, which can significantly improve performance. If the optional +*account-name* is supplied, it will be passed along to the `op get` call, which +will help it look in the right account, in case you have multiple accounts (eg. +personal and work accounts). If there is no valid session in the environment, +by default you will be interactively prompted to sign in. + +!!! example + + ``` + {{- onepasswordDocument "<uuid>" -}} + {{- onepasswordDocument "<uuid>" "<vault-uuid>" -}} + {{- onepasswordDocument "<uuid>" "<vault-uuid>" "<account-name>" -}} + {{- onepasswordDocument "<uuid>" "" "<account-name>" -}} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/onepasswordItemFields.md b/assets/chezmoi.io/docs/reference/templates/functions/onepasswordItemFields.md new file mode 100644 index 00000000000..c251cfc870f --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/onepasswordItemFields.md @@ -0,0 +1,66 @@ +# `onepasswordItemFields` *uuid* [*vault-uuid* [*account-name*]] + +`onepasswordItemFields` returns structured data from +[1Password](https://1password.com/) using the [1Password +CLI](https://support.1password.com/command-line-getting-started/) (`op`). +*uuid* is passed to `op get item <uuid>`, the output from `op` is parsed as +JSON, and each element of `details.sections` are iterated over and any `fields` +are returned as a map indexed by each field's `n`. If there is no valid session +in the environment, by default you will be interactively prompted to sign in. + +!!! example + + The result of + + ``` + {{ (onepasswordItemFields "abcdefghijklmnopqrstuvwxyz").exampleLabel.v }} + ``` + + is equivalent to calling + + ```console + $ op get item abcdefghijklmnopqrstuvwxyz --fields exampleLabel + ``` + +!!! example + + Given the output from `op`: + + ```json + { + "uuid": "<uuid>", + "details": { + "sections": [ + { + "name": "linked items", + "title": "Related Items" + }, + { + "fields": [ + { + "k": "string", + "n": "D4328E0846D2461E8E455D7A07B93397", + "t": "exampleLabel", + "v": "exampleValue" + } + ], + "name": "Section_20E0BD380789477D8904F830BFE8A121", + "title": "" + } + ] + }, + } + ``` + + the return value of `onepasswordItemFields` will be the map: + + ```json + { + "exampleLabel": { + "k": "string", + "n": "D4328E0846D2461E8E455D7A07B93397", + "t": "exampleLabel", + "v": "exampleValue" + } + } + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/output.md b/assets/chezmoi.io/docs/reference/templates/functions/output.md new file mode 100644 index 00000000000..64e76dca347 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/output.md @@ -0,0 +1,13 @@ +# `output` *name* [*arg*...] + +`output` returns the output of executing the command *name* with *arg*s. If +executing the command returns an error then template execution exits with an +error. The execution occurs every time that the template is executed. It is the +user's responsibility to ensure that executing the command is both idempotent +and fast. + +!!! example + + ``` + current-context: {{ output "kubectl" "config" "current-context" | trim }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/pass.md b/assets/chezmoi.io/docs/reference/templates/functions/pass.md new file mode 100644 index 00000000000..898ddb7d205 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/pass.md @@ -0,0 +1,13 @@ +# `pass` *pass-name* + +`pass` returns passwords stored in [pass](https://www.passwordstore.org/) using +the pass CLI (`pass`). *pass-name* is passed to `pass show <pass-name>` and the +first line of the output of `pass` is returned with the trailing newline +stripped. The output from `pass` is cached so calling `pass` multiple times +with the same *pass-name* will only invoke `pass` once. + +!!! example + + ``` + {{ pass "<pass-name>" }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/passFields.md b/assets/chezmoi.io/docs/reference/templates/functions/passFields.md new file mode 100644 index 00000000000..6ec0fd7e22c --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/passFields.md @@ -0,0 +1,32 @@ +# `passFields` *pass-name* + +`passFields` returns structured data stored in +[pass](https://www.passwordstore.org) using the pass CLI (`pass`). *pass-name* +is passed to `pass show <pass-name>` and the output is parsed as +colon-separated key-value pairs, one per line. The return value is a map of +keys to values. + +!!! example + + Given the output from `pass`: + + ``` + GitHub + login: username + password: secret + ``` + + the return value will be the map: + + ```json + { + "login": "username", + "password": "secret" + } + ``` + +!!! example + + ``` + {{ (passFields "GitHub").password }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/passRaw.md b/assets/chezmoi.io/docs/reference/templates/functions/passRaw.md new file mode 100644 index 00000000000..1cb9e1ba109 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/passRaw.md @@ -0,0 +1,7 @@ +# `passRaw` *pass-name* + +`passRaw` returns passwords stored in [pass](https://www.passwordstore.org/) +using the pass CLI (`pass`). *pass-name* is passed to `pass show <pass-name>` +and the output is returned. The output from `pass` is cached so calling +`passRaw` multiple times with the same *pass-name* will only invoke `pass` +once. diff --git a/assets/chezmoi.io/docs/reference/templates/functions/promptBool.md b/assets/chezmoi.io/docs/reference/templates/functions/promptBool.md new file mode 100644 index 00000000000..892f3ba97ba --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/promptBool.md @@ -0,0 +1,11 @@ +# `promptBool` *prompt* [*default*] + +`promptBool` prompts the user with *prompt* and returns the user's response +interpreted as a boolean. If *default* is passed the user's response is empty +then it returns *default*. It is only available when generating the initial +config file. The user's response is interpreted as follows (case insensitive): + +| Response | Result | +| ----------------------- | ------- | +| 1, on, t, true, y, yes | `true` | +| 0, off, f, false, n, no | `false` | diff --git a/assets/chezmoi.io/docs/reference/templates/functions/promptInt.md b/assets/chezmoi.io/docs/reference/templates/functions/promptInt.md new file mode 100644 index 00000000000..ad884dedb6c --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/promptInt.md @@ -0,0 +1,6 @@ +# `promptInt` *prompt* [*default*] + +`promptInt` prompts the user with *prompt* and returns the user's response +interpreted as an integer. If *default* is passed and the user's response is +empty then it returns *default*. It is only available when generating the +initial config file. diff --git a/assets/chezmoi.io/docs/reference/templates/functions/promptString.md b/assets/chezmoi.io/docs/reference/templates/functions/promptString.md new file mode 100644 index 00000000000..0e346735603 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/promptString.md @@ -0,0 +1,14 @@ +# `promptString` *prompt* [*default*] + +`promptString` prompts the user with *prompt* and returns the user's response +with all leading and trailing spaces stripped. If *default* is passed and the +user's response is empty then it returns *default*. It is only available when +generating the initial config file. + +!!! example + + ``` + {{ $email := promptString "email" -}} + [data] + email = {{ $email | quote }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/secret.md b/assets/chezmoi.io/docs/reference/templates/functions/secret.md new file mode 100644 index 00000000000..f286fdd563d --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/secret.md @@ -0,0 +1,6 @@ +# `secret` [*arg*...] + +`secret` returns the output of the generic secret command defined by the +`secret.command` configuration variable with *arg*s with leading and trailing +whitespace removed. The output is cached so multiple calls to `secret` with the +same *arg*s will only invoke the generic secret command once. diff --git a/assets/chezmoi.io/docs/reference/templates/functions/secretJSON.md b/assets/chezmoi.io/docs/reference/templates/functions/secretJSON.md new file mode 100644 index 00000000000..8edf4f96e6f --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/secretJSON.md @@ -0,0 +1,6 @@ +# `secretJSON` [*arg*...] + +`secretJSON` returns structured data from the generic secret command defined by +the `secret.command` configuration variable with *arg*s. The output is parsed +as JSON. The output is cached so multiple calls to `secret` with the same +*args* will only invoke the generic secret command once. diff --git a/assets/chezmoi.io/docs/reference/templates/functions/stat.md b/assets/chezmoi.io/docs/reference/templates/functions/stat.md new file mode 100644 index 00000000000..c341a2849e5 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/stat.md @@ -0,0 +1,19 @@ +# `stat` *name* + +`stat` runs `stat(2)` on *name*. If *name* exists it returns structured data. +If *name* does not exist then it returns a false value. If `stat(2)` returns +any other error then it raises an error. The structured value returned if +*name* exists contains the fields `name`, `size`, `mode`, `perm`, `modTime`, +and `isDir`. + +`stat` is not hermetic: its return value depends on the state of the filesystem +at the moment the template is executed. Exercise caution when using it in your +templates. + +!!! example + + ``` + {{ if stat (joinPath .chezmoi.homeDir ".pyenv") }} + # ~/.pyenv exists + {{ end }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/stdinIsATTY.md b/assets/chezmoi.io/docs/reference/templates/functions/stdinIsATTY.md new file mode 100644 index 00000000000..b6f80425bc2 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/stdinIsATTY.md @@ -0,0 +1,17 @@ +# `stdinIsATTY` + +`stdinIsATTY` returns `true` if chezmoi's standard input is a TTY. It is only +available when generating the initial config file. It is primarily useful for +determining whether `prompt*` functions should be called or default values be +used. + +!!! example + + ``` + {{ $email := "" }} + {{ if stdinIsATTY }} + {{ $email = promptString "email" }} + {{ else }} + {{ $email = "[email protected]" }} + {{ end }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/toYaml.md b/assets/chezmoi.io/docs/reference/templates/functions/toYaml.md new file mode 100644 index 00000000000..0306ac858d3 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/toYaml.md @@ -0,0 +1,9 @@ +# `toYaml` *value* + +`toYaml` returns the YAML representation of *value*. + +!!! example + + ``` + {{ dict "key" "value" | toYaml }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/vault.md b/assets/chezmoi.io/docs/reference/templates/functions/vault.md new file mode 100644 index 00000000000..08dfc9df0b9 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/vault.md @@ -0,0 +1,13 @@ +# `vault` *key* + +`vault` returns structured data from [Vault](https://www.vaultproject.io/) +using the [Vault CLI](https://www.vaultproject.io/docs/commands/) (`vault`). +*key* is passed to `vault kv get -format=json <key>` and the output from +`vault` is parsed as JSON. The output from `vault` is cached so calling `vault` +multiple times with the same *key* will only invoke `vault` once. + +!!! example + + ``` + {{ (vault "<key>").data.data.password }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/writeToStdout.md b/assets/chezmoi.io/docs/reference/templates/functions/writeToStdout.md new file mode 100644 index 00000000000..b3983db0e95 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/writeToStdout.md @@ -0,0 +1,10 @@ +# `writeToStdout` *string*... + +`writeToStdout` writes each *string* to stdout. It is only available when +generating the initial config file. + +!!! example + + ``` + {{- writeToStdout "Hello, world\n" -}} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/index.md b/assets/chezmoi.io/docs/reference/templates/index.md new file mode 100644 index 00000000000..3b8f87460f2 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/index.md @@ -0,0 +1,35 @@ +# Templates + +chezmoi executes templates using +[`text/template`](https://pkg.go.dev/text/template). The result is treated +differently depending on whether the target is a file or a symlink. + +If target is a file, then: + +* If the result is an empty string, then the file is removed. + +* Otherwise, the target file contents are result. + +If the target is a symlink, then: + +* Leading and trailing whitespace are stripped from the result. + +* If the result is an empty string, then the symlink is removed. + +* Otherwise, the target symlink target is the result. + +chezmoi executes templates using `text/template`'s `missingkey=error` option, +which means that misspelled or missing keys will raise an error. This can be +overridden by setting a list of options in the configuration file. + +!!! hint + + For a full list of template options, see + [`Template.Option`](https://pkg.go.dev/text/template?tab=doc#Template.Option). + +!!! example + + ```toml title="~/.config/chezmoi/chezmoi.toml" + [template] + options = ["missingkey=zero"] + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/variables.md b/assets/chezmoi.io/docs/reference/templates/variables.md new file mode 100644 index 00000000000..e2d94747109 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/variables.md @@ -0,0 +1,30 @@ +# Variables + +chezmoi provides the following automatically-populated variables: + +| Variable | Type | Value | +| -------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| `.chezmoi.arch` | string | Architecture, e.g. `amd64`, `arm`, etc. as returned by [runtime.GOARCH](https://pkg.go.dev/runtime?tab=doc#pkg-constants) | +| `.chezmoi.args` | []string | The arguments passed to the `chezmoi` command, starting with the program command | +| `.chezmoi.cacheDir` | string | The cache directory | +| `.chezmoi.configFile` | string | The path to the configuration file used by chezmoi | +| `.chezmoi.executable` | string | The path to the `chezmoi` executable, if available | +| `.chezmoi.fqdnHostname` | string | The fully-qualified domain name hostname of the machine chezmoi is running on | +| `.chezmoi.group` | string | The group of the user running chezmoi | +| `.chezmoi.homeDir` | string | The home directory of the user running chezmoi | +| `.chezmoi.hostname` | string | The hostname of the machine chezmoi is running on, up to the first `.` | +| `.chezmoi.kernel` | string | Contains information from `/proc/sys/kernel`. Linux only, useful for detecting specific kernels (e.g. Microsoft's WSL kernel) | +| `.chezmoi.os` | string | Operating system, e.g. `darwin`, `linux`, etc. as returned by [runtime.GOOS](https://pkg.go.dev/runtime?tab=doc#pkg-constants) | +| `.chezmoi.osRelease` | string | The information from `/etc/os-release`, Linux only, run `chezmoi data` to see its output | +| `.chezmoi.sourceDir` | string | The source directory | +| `.chezmoi.sourceFile` | string | The path of the template relative to the source directory | +| `.chezmoi.username` | string | The username of the user running chezmoi | +| `.chezmoi.version.builtBy` | string | The program that built the `chezmoi` executable, if set | +| `.chezmoi.version.commit` | string | The git commit at which the `chezmoi` executable was built, if set | +| `.chezmoi.version.date` | string | The timestamp at which the `chezmoi` executable was built, if set | +| `.chezmoi.version.version` | string | The version of chezmoi | +| `.chezmoi.workingTree` | string | The working tree of the source directory | + +Additional variables can be defined in the config file in the `data` section. +Variable names must consist of a letter and be followed by zero or more letters +and/or digits. diff --git a/assets/chezmoi.io/docs/user-guide/advanced/customize-your-source-directory.md b/assets/chezmoi.io/docs/user-guide/advanced/customize-your-source-directory.md new file mode 100644 index 00000000000..2e41299f07b --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/advanced/customize-your-source-directory.md @@ -0,0 +1,30 @@ +# Customize your source directory + +## Use a subdirectory of your dotfiles repo as the root of the source state + +By default, chezmoi uses the root of your dotfiles repo as the root of the +source state. If your source state contains many entries in its root, then your +target directory (usually your home directory) will in turn be filled with many +entries in its root as well. You can reduce the number of entries by keeping +`.chezmoiignore` up to date, but this can become tiresome. + +Instead, you can specify that chezmoi should read the source state from a +subdirectory of the source directory instead by creating a file called +`.chezmoiroot` containing the relative path to this subdirectory. + +For example, given: + +``` title="~/.local/share/chezmoi/.chezmoiroot" +home +``` + +Then chezmoi will read the source state from the `home` subdirectory of your +source directory, for example the desired state of `~/.gitconfig` will be read +from `~/.local/share/chezmoi/home/dot_gitconfig` (instead of +`~/.local/share/chezmoi/dot_gitconfig`). + +When migrating an existing chezmoi dotfiles repo to use `.chezmoiroot` you will +need to move the relevant files in to the new root subdirectory manually. You +do not need to move files that are ignored by chezmoi in all cases (i.e. are +listed in `.chezmoiignore` when executed as a template on all machines), and +you can afterwards remove their entries from `home/.chezmoiignore`. diff --git a/assets/chezmoi.io/docs/user-guide/advanced/migrate-away-from-chezmoi.md b/assets/chezmoi.io/docs/user-guide/advanced/migrate-away-from-chezmoi.md new file mode 100644 index 00000000000..62c1e3ceace --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/advanced/migrate-away-from-chezmoi.md @@ -0,0 +1,19 @@ +# Migrate away from chezmoi + +chezmoi provides several mechanisms to help you move to an alternative dotfile +manager (or even no dotfile manager at all) in the future: + +chezmoi creates your dotfiles just as if you were not using a dotfile manager +at all. Your dotfiles are regular files, directories, and symlinks. You can run +[`chezmoi purge`](/reference/commands/purge/) to delete all traces of chezmoi +and then, if you're migrating to a new dotfile manager, then you can use +whatever mechanism it provides to add your dotfiles to your new system. + +chezmoi has a [`chezmoi archive`](/reference/commands/archive/) command that +generates a tarball of your dotfiles. You can replace the contents of your +dotfiles repo with the contents of the archive and you've effectively +immediately migrated away from chezmoi. + +chezmoi has a [`chezmoi dump`](/reference/commands/dump/) command that dumps +the interpreted (target) state in a machine-readable form, so you can write +scripts around chezmoi. diff --git a/assets/chezmoi.io/docs/user-guide/daily-operations.md b/assets/chezmoi.io/docs/user-guide/daily-operations.md new file mode 100644 index 00000000000..1fa5cea184d --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/daily-operations.md @@ -0,0 +1,79 @@ +# Daily operations + +## Pull the latest changes from your repo and apply them + +You can pull the changes from your repo and apply them in a single command: + +```console +$ chezmoi update +``` + +This runs `git pull --rebase` in your source directory and then `chezmoi apply`. + +## Pull the latest changes from your repo and see what would change, without actually applying the changes + +Run: + +```console +$ chezmoi git pull -- --rebase && chezmoi diff +``` + +This runs `git pull --rebase` in your source directory and `chezmoi +diff` then shows the difference between the target state computed from your +source directory and the actual state. + +If you're happy with the changes, then you can run + +```console +$ chezmoi apply +``` + +to apply them. + +## Automatically commit and push changes to your repo + +chezmoi can automatically commit and push changes to your source directory to +your repo. This feature is disabled by default. To enable it, add the following +to your config file: + +```toml title="~/.config/chezmoi/chezmoi.toml" +[git] + autoCommit = true + autoPush = true +``` + +Whenever a change is made to your source directory, chezmoi will commit the +changes with an automatically-generated commit message (if `autoCommit` is true) +and push them to your repo (if `autoPush` is true). `autoPush` implies +`autoCommit`, i.e. if `autoPush` is true then chezmoi will auto-commit your +changes. If you only set `autoCommit` to true then changes will be committed but +not pushed. + +Be careful when using `autoPush`. If your dotfiles repo is public and you +accidentally add a secret in plain text, that secret will be pushed to your +public repo. + +## Install chezmoi and your dotfiles on a new machine with a single command + +chezmoi's install script can run `chezmoi init` for you by passing extra +arguments to the newly installed chezmoi binary. If your dotfiles repo is +`github.com/<github-username>/dotfiles` then installing chezmoi, running +`chezmoi init`, and running `chezmoi apply` can be done in a single line of +shell: + +```console +$ sh -c "$(curl -fsLS chezmoi.io/get)" -- init --apply <github-username> +``` + +If your dotfiles repo has a different name to `dotfiles`, or if you host your +dotfiles on a different service, then see the [reference manual for `chezmoi +init`](/reference/commands/init/). + +For setting up transitory environments (e.g. short-lived Linux containers) you +can install chezmoi, install your dotfiles, and then remove all traces of +chezmoi, including the source directory and chezmoi's configuration directory, +with a single command: + +```console +$ sh -c "$(curl -fsLS chezmoi.io/get)" -- init --one-shot <github-username> +``` diff --git a/assets/chezmoi.io/docs/user-guide/encryption/age.md b/assets/chezmoi.io/docs/user-guide/encryption/age.md new file mode 100644 index 00000000000..7f4e34ae783 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/encryption/age.md @@ -0,0 +1,76 @@ +# age + +chezmoi supports encrypting files with [age](https://age-encryption.org/). + +Generate a key using `age-keygen`: + +```console +$ age-keygen -o $HOME/key.txt +Public key: age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p +``` + +Specify age encryption in your configuration file, being sure to specify at +least the identity and one recipient: + +```toml title="~/.config/chezmoi/chezmoi.toml" +encryption = "age" +[age] + identity = "/home/user/key.txt" + recipient = "age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p" +``` + +chezmoi supports multiple recipients and recipient files, and multiple +identities. + +## Symmetric encryption + +To use age's symmetric encryption, specify a single identity and enable +symmetric encryption in your config file, for example: + +```toml title="~/.config/chezmoi/chezmoi.toml" +encryption = "age" +[age] + identity = "~/.ssh/id_rsa" + symmetric = true +``` + +## Symmetric encryption with a passphrase + +To use age's symmetric encryption with a passphrase, set `age.passphrase` to +`true` in your config file, for example: + +```toml title="~/.config/chezmoi/chezmoi.toml" +encryption = "age" +[age] + passphrase = true +``` + +You will be prompted for the passphrase whenever you run `chezmoi add +--encrypt` and whenever chezmoi needs to decrypt the file, for example when you +run `chezmoi apply`, `chezmoi diff`, or `chezmoi status`. + +## Builtin age encryption + +chezmoi has builtin support for age encryption which is automatically used if +the `age` command is not found in `$PATH`. + +!!! info + + The builtin age encryption not support passphrases, symmetric encryption, + or SSH keys. + + Passphrases are not supported because chezmoi needs to decrypt files + regularly, e.g. when running a `chezmoi diff` or a `chezmoi status` + command, not just when running `chezmoi apply`. Prompting for a passphrase + each time would quickly become tiresome. + + Symmetric encryption may be supported in the future. Please [open an + issue](https://github.com/twpayne/chezmoi/issues/new?assignees=&labels=enhancement&template=02_feature_request.md&title=) + if you want this. + + SSH keys are not supported as the author of age [explicitly recommends not + using them](https://pkg.go.dev/filippo.io/age#hdr-Key_management): + + > When integrating age into a new system, it's recommended that you only + > support X25519 keys, and not SSH keys. The latter are supported for + > manual encryption operations. diff --git a/assets/chezmoi.io/docs/user-guide/encryption/gpg.md b/assets/chezmoi.io/docs/user-guide/encryption/gpg.md new file mode 100644 index 00000000000..32081ed5fa1 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/encryption/gpg.md @@ -0,0 +1,60 @@ +# gpg + +chezmoi supports encrypting files with [gpg](https://www.gnupg.org/). Encrypted +files are stored in the source state and automatically be decrypted when +generating the target state or printing a file's contents with `chezmoi cat`. + +## Asymmetric (private/public-key) encryption + +Specify the encryption key to use in your configuration file (`chezmoi.toml`) +with the `gpg.recipient` key: + +```toml title="~/.config/chezmoi/chezmoi.toml" +encryption = "gpg" +[gpg] + recipient = "..." +``` + +chezmoi will encrypt files: + +```sh +gpg --armor --recipient <recipient> --encrypt +``` + +and store the encrypted file in the source state. The file will automatically +be decrypted when generating the target state. + +!!! hint + + The `gpg.recipient` key must be ultimately trusted, otherwise encryption + will fail because gpg will prompt for input, which chezmoi does not handle. + You can check the trust level by running: + + ```console + $ gpg --export-ownertrust + ``` + + The trust level for the recipient's key should be `6`. If it is not, you + can change the trust level by running: + + ```console + $ gpg --edit-key <recipient> + ``` + + Enter `trust` at the prompt and chose `5 = I trust ultimately`. + +## Symmetric encryption + +Specify symmetric encryption in your configuration file: + +```toml title="~/.config/chezmoi/chezmoi.toml" +encryption = "gpg" +[gpg] + symmetric = true +``` + +chezmoi will encrypt files: + +```sh +gpg --armor --symmetric +``` diff --git a/assets/chezmoi.io/docs/user-guide/encryption/index.md b/assets/chezmoi.io/docs/user-guide/encryption/index.md new file mode 100644 index 00000000000..d76b09f91c9 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/encryption/index.md @@ -0,0 +1,15 @@ +# Encryption + +chezmoi supports encrypting whole files with [age](https://age-encryption.org) +and [gpg](https://www.gnupg.com/). Encrypted files are stored in ASCII-armored +format in the source directory with the `encrypted_` attribute and are +automatically decrypted when needed. + +Add files to be encrypted with the `--encrypt` flag, for example: + +```console +$ chezmoi add --encrypt ~/.ssh/id_rsa +``` + +`chezmoi edit` will transparently decrypt the file before editing and +re-encrypt it afterwards. diff --git a/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/design.md b/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/design.md new file mode 100644 index 00000000000..09adeeb184c --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/design.md @@ -0,0 +1,281 @@ +# Design + +## Do I have to use `chezmoi edit` to edit my dotfiles? + +No. `chezmoi edit` is a convenience command that has a couple of useful +features, but you don't have to use it. + +You can also run `chezmoi cd` and then just edit the files in the source state +directly. After saving an edited file you can run `chezmoi diff` to check what +effect the changes would have, and run `chezmoi apply` if you're happy with +them. If there are inconsistencies that you want to keep, then `chezmoi +merge-all` will help you resolve any differences. + +`chezmoi edit` provides the following useful features: +* The arguments to `chezmoi edit` are the files in their target location, so you + don't have to think about source state attributes and your editor's syntax + highlighting will work. + +* If the dotfile is encrypted in the source state, then `chezmoi edit` will + decrypt it to a private directory, open that file in your `$EDITOR`, and then + re-encrypt the file when you quit your editor. That makes encryption + transparent. + +* With the `--diff` and `--apply` options you can see what would change and + apply those changes without having to run `chezmoi diff` or `chezmoi apply`. + +If you chose to edit files in the source state and you're using VIM then then +[`github.com/alker0/chezmoi.vim`](https://github.com/alker0/chezmoi.vim) gives +you syntax highlighting, however you edit your files. + +## Why doesn't chezmoi use symlinks like GNU Stow? + +Symlinks are first class citizens in chezmoi: chezmoi supports creating them, +updating them, removing them, and even more advanced features not found +elsewhere like having the same symlink point to different targets on different +machines by using a template. + +With chezmoi, you only use a symlink where you really need a symlink, in +contrast to some other dotfile managers (e.g. GNU Stow) which require the use +of symlinks as a layer of indirection between a dotfile's location (which can +be anywhere in your home directory) and a dotfile's content (which needs to be +in a centralized directory that you manage with version control). chezmoi +solves this problem in a different way. + +Instead of using a symlink to redirect from the dotfile's location to the +centralized directory, chezmoi generates the dotfile as a regular file in its +final location from the contents of the centralized directory. This approach +allows chezmoi to provide features that are not possible when using symlinks, +for example having files that are encrypted, executable, private, or templates. + +There's nothing special about dotfiles managed by chezmoi, whereas dotfiles +managed with GNU Stow are special because they're actually symlinks to +somewhere else. + +The only advantage to using GNU Stow-style symlinks is that changes that you +make to the dotfile's contents in the centralized directory are immediately +visible, whereas chezmoi currently requires you to run `chezmoi apply` or +`chezmoi edit --apply`. chezmoi will likely get an alternative solution to this +too, see [#752](https://github.com/twpayne/chezmoi/issues/752). + +If you really want to use symlinks, then chezmoi provides a [symlink +mode](/reference/target-types/#symlink-mode) which uses symlinks where +possible. + +You can configure chezmoi to work like GNU Stow and have it create a set of +symlinks back to a central directory, but this currently requires a bit of +manual work (as described in +[#167](https://github.com/twpayne/chezmoi/issues/167)). chezmoi might get some +automation to help (see [#886](https://github.com/twpayne/chezmoi/issues/886) +for example) but it does need some convincing use cases that demonstrate that a +symlink from a dotfile's location to its contents in a central directory is +better than just having the correct dotfile contents. + +## What are the limitations of chezmoi's symlink mode? + +In symlink mode chezmoi replaces targets with symlinks to the source directory +if the the target is a regular file and is not encrypted, executable, private, +or a template. + +Symlinks cannot be used for encrypted files because the source state contains +the ciphertext, not the plaintext. + +Symlinks cannot be used for executable files as the executable bit would need +to be set on the file in the source directory and chezmoi uses only regular +files and directories in its source state for portability across operating +systems. This may change in the future. + +Symlinks cannot be used for private files because git does not persist group +and world permission bits. + +Symlinks cannot be used for templated files because the source state contains +the template, not the result of executing the template. + +Symlinks cannot be used for entire directories because of chezmoi's use of +attributes in the filename mangles entries in the directory, directories might +have the `exact_` attribute and contain empty files, and the directory's +entries might not be usable with symlinks. + +In symlink mode, running `chezmoi add` does not immediately replace the targets +with a symlink. You must run `chezmoi apply` to create the symlinks. + +## Can I change how chezmoi's source state is represented on disk? + +There are a number of criticisms of how chezmoi's source state is represented +on disk: + +1. Not all possible file permissions can be represented. +2. The long source file names are weird and verbose. +3. Everything is in a single directory, which can end up containing many + entries. + +chezmoi's source state representation is a deliberate, practical compromise. + +The `dot_` attribute makes it transparent which dotfiles are managed by chezmoi +and which files are ignored by chezmoi. chezmoi ignores all files and +directories that start with `.` so no special whitelists are needed for version +control systems and their control files (e.g. `.git` and `.gitignore`). + +chezmoi needs per-file metadata to know how to interpret the source file's +contents, for example to know when the source file is a template or if the +file's contents are encrypted. By storing this metadata in the filename, the +metadata is unambiguously associated with a single file and adding, updating, +or removing a single file touches only a single file in the source state. +Changes to the metadata (e.g. `chezmoi chattr +template *target*`) are simple +file renames and isolated to the affected file. + +If chezmoi were to, say, use a common configuration file listing which files +were templates and/or encrypted, then changes to any file would require updates +to the common configuration file. Automating updates to configuration files +requires a round trip (read config file, update config, write config) and it is +not always possible preserve comments and formatting. + +chezmoi's attributes of `executable_`, `private_`, and `readonly_` allow a the +file permissions `0o644`, `0o755`, `0o600`, `0o700`, `0o444`, `0o555`, `0o400`, +and `0o500` to be represented. Directories can only have permissions `0o755`, +`0o700`, or `0o500`. In practice, these cover all permissions typically used +for dotfiles. If this does cause a genuine problem for you, please [open an +issue on GitHub](https://github.com/twpayne/chezmoi/issues/new/choose). + +File permissions and modes like `executable_`, `private_`, `readonly_`, and +`symlink_` could also be stored in the filesystem, rather than in the filename. +However, this requires the permissions to be preserved and handled by the +underlying version control system and filesystem. chezmoi provides first-class +support for Windows, where the `executable_` and `private_` attributes have no +direct equivalents and symbolic links are not always permitted. By using +regular files and directories, chezmoi avoids variations in the operating +system, version control system, and filesystem making it both more robust and +more portable. + +chezmoi uses a 1:1 mapping between entries in the source state and entries in +the target state. This mapping is bi-directional and unambiguous. + +However, this also means that dotfiles that in the same directory in the target +state must be in the same directory in the source state. In particular, every +entry managed by chezmoi in the root of your home directory has a corresponding +entry in the root of your source directory, which can mean that you end up with +a lot of entries in the root of your source directory. + +If chezmoi were to permit, say, multiple separate source directories (so you +could, say, put `dot_bashrc` in a `bash/` subdirectory, and `dot_vimrc` in a +`vim/` subdirectory, but have `chezmoi apply` map these to `~/.bashrc` and +`~/.vimrc` in the root of your home directory) then the mapping between source +and target states is no longer bidirectional nor unambiguous, which +significantly increases complexity and requires more user interaction. For +example, if both `bash/dot_bashrc` and `vim/dot_bashrc` exist, what should be +the contents of `~/.bashrc`? If you run `chezmoi add ~/.zshrc`, should +`dot_zshrc` be stored in the source `bash/` directory, the source `vim/` +directory, or somewhere else? How does the user communicate their preferences? + +chezmoi has many users and any changes to the source state representation must +be backwards-compatible. + +In summary, chezmoi's source state representation is a compromise with both +advantages and disadvantages. Changes to the representation will be considered, +but must meet the following criteria, in order of importance: + +1. Be fully backwards-compatible for existing users. +2. Fix a genuine problem encountered in practice. +3. Be independent of the underlying operating system, version control system, + and filesystem. +4. Not add significant extra complexity to the user interface or underlying + implementation. + +## Why does chezmoi convert all my template variables to lowercase? + +This is due to a feature in +[`github.com/spf13/viper`](https://github.com/spf13/viper), the library that +chezmoi uses to read its configuration file. For more information see [this +GitHub issue](https://github.com/twpayne/chezmoi/issues/463). + +## Why does `chezmoi cd` spawn a shell instead of just changing directory? + +`chezmoi cd` spawns a shell because it is not possible for a program to change +the working directory of its parent process. You can add a shell function instead: + +```bash +chezmoi-cd() { + cd $(chezmoi source-path) +} +``` + +Typing `chezmoi-cd` will then change the directory of your current shell to +chezmoi's source directory. + +## Why not use Ansible/Chef/Puppet/Salt, or similar to manage my dotfiles instead? + +Whole system management tools are more than capable of managing your dotfiles, +but are large systems that entail several disadvantages. Compared to whole +system management tools, chezmoi offers: + +* Small, focused feature set designed for dotfiles. There's simply less to learn + with chezmoi compared to whole system management tools. + +* Easy installation and execution on every platform, without root access. + Installing chezmoi requires only copying a single binary file with no external + dependencies. Executing chezmoi just involves running the binary. In contrast, + installing and running a whole system management tool typically requires + installing a scripting language runtime, several packages, and running a + system service, all typically requiring root access. + +chezmoi's focus and simple installation means that it runs almost everywhere: +from tiny ARM-based Linux systems to Windows desktops, from inside lightweight +containers to FreeBSD-based virtual machines in the cloud. + +## Can I use chezmoi to manage files outside my home directory? + +In practice, yes, you can, but this is strongly discouraged beyond using your +system's package manager to install the packages you need. + +chezmoi is designed to operate on your home directory, and is explicitly not a +full system configuration management tool. That said, there are some ways to +have chezmoi manage a few files outside your home directory. + +chezmoi's scripts can execute arbitrary commands, so you can use a `run_` script +that is run every time you run `chezmoi apply`, to, for example: + +* Make the target file outside your home directory a symlink to a file managed + by chezmoi in your home directory. + +* Copy a file managed by chezmoi inside your home directory to the target file. + +* Execute a template with `chezmoi execute-template --output=filename template` + where `filename` is outside the target directory. + +chezmoi executes all scripts as the user executing chezmoi, so you may need to +add extra privilege elevation commands like `sudo` or `PowerShell start -verb +runas -wait` to your script. + +chezmoi, by default, operates on your home directory but this can be overridden +with the `--destination` command line flag or by specifying `destDir` in your +config file, and could even be the root directory (`/` or `C:\`). This allows +you, in theory, to use chezmoi to manage any file in your filesystem, but this +usage is extremely strongly discouraged. + +If your needs extend beyond modifying a handful of files outside your target +system, then existing configuration management tools like +[Puppet](https://puppet.com/), [Chef](https://chef.io/), +[Ansible](https://www.ansible.com/), and [Salt](https://www.saltstack.com/) are +much better suited - and of course can be called from a chezmoi `run_` script. +Put your Puppet Manifests, Chef Recipes, Ansible Modules, and Salt Modules in a +directory ignored by `.chezmoiignore` so they do not pollute your home +directory. + +## What inspired chezmoi? + +chezmoi was inspired by [Puppet](https://puppet.com/), but was created because +Puppet is an overkill for managing your personal configuration files. The focus +of chezmoi will always be personal home directory management. If your needs +grow beyond that, switch to a whole system configuration management tool. + +## Where does the name "chezmoi" come from? + +"chezmoi" splits to "chez moi" and pronounced /ʃeɪ mwa/ (shay-moi) meaning "at +my house" in French. It's seven letters long, which is an appropriate length for +a command that is only run occasionally. If you prefer a shorter command, add an +alias to your shell configuration, for example: + +```sh +alias cz=chezmoi +``` + diff --git a/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/general.md b/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/general.md new file mode 100644 index 00000000000..1e282b6d7a4 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/general.md @@ -0,0 +1,31 @@ +# General + +## What other questions have been asked about chezmoi? + +See the +[issues](https://github.com/twpayne/chezmoi/issues?utf8=%E2%9C%93&q=is%3Aissue+sort%3Aupdated-desc+label%3Asupport) +and [discussions](https://github.com/twpayne/chezmoi/discussions). + +## Where do I ask a question that isn't answered here? + +Please [open an issue on +GitHub](https://github.com/twpayne/chezmoi/issues/new/choose) or [start a +discussion](https://github.com/twpayne/chezmoi/discussions/new). + +## I like chezmoi. How do I say thanks? + +Thank you! chezmoi was written to scratch a personal itch, and I'm very happy +that it's useful to you. Please give [chezmoi a star on +GitHub](https://github.com/twpayne/chezmoi/stargazers), and if you're happy to +share your public dotfile repo then [tag it with +`chezmoi`](https://github.com/topics/chezmoi?o=desc&s=updated). + +If you write an article or give a talk on chezmoi please inform the author +(e.g. by [opening an +issue](https://github.com/twpayne/chezmoi/issues/new/choose)) so it can be +added to chezmoi's [aricles, podcasts, and videos page](/links/articles-podcasts-and-videos/). + +[Contributions are very welcome](/developer/contributing-changes/) and every [bug report, support +request, and feature +request](https://github.com/twpayne/chezmoi/issues/new/choose) helps make +chezmoi better. Thank you :) diff --git a/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/index.md b/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/index.md new file mode 100644 index 00000000000..554f7bdbbc7 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/index.md @@ -0,0 +1 @@ +# Frequently asked questions diff --git a/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/troubleshooting.md b/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/troubleshooting.md new file mode 100644 index 00000000000..4a1a9b64a4f --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/troubleshooting.md @@ -0,0 +1,107 @@ +# Troubleshooting + +## How can I quickly check for problems with chezmoi on my machine? + +Run: + +```console +$ chezmoi doctor +``` + +Anything `ok` is fine, anything `warning` is only a problem if you want to use +the related feature, and anything `error` indicates a definite problem. + +## The output of `chezmoi diff` is broken and does not contain color. What could be wrong? + +By default, chezmoi's diff output includes ANSI color escape sequences (e.g. +`ESC[37m`) and is piped into your pager (by default `less`). chezmoi assumes +that your pager passes through the ANSI color escape sequences, as configured on +many systems, but not all. If your pager does not pass through ANSI color escape +sequences then you will see monochrome diff output with uninterpreted ANSI color +escape sequences. + +This can typically by fixed by setting the environment variable + +```console +$ export LESS=-R +``` + +which instructs `less` to display "raw" control characters via the `-R` / +`--RAW-CONTROL-CHARS` option. + +You can also set the `pager` configuration variable in your config file, for +example: + +```toml title="~/.config/chezmoi/chezmoi.toml" +pager = "less -R" +``` + +If you have set a different pager (via the `pager` configuration variable or +`PAGER` environment variable) then you must ensure that it passes through raw +control characters. Alternatively, you can use the `--color=false` option to +chezmoi to disable colors or the `--no-pager` option to chezmoi to disable the +pager. + +## Why do I get a blank buffer when running `chezmoi edit`? + +What's happening here is that your editor is forking, detaching, and terminating +the original process, which chezmoi cannot distinguish from the editor +terminating normally. + +You have two options: +1. Configure your editor command to remain in the foreground. For `vim`, this + means passing the `-f` flag, e.g. by setting the `edit.flags` configuration + variable to `["-f"]`, or by setting the `EDITOR` environment variable to + include the `-f` flag, e.g. `export EDITOR="mvim -f"`. For VSCode, pass the + `--wait` flag. +2. Set the `edit.hardlink` configuration variable to `false`. + +## chezmoi makes `~/.ssh/config` group writeable. How do I stop this? + +By default, chezmoi uses your system's umask when creating files. On most +systems the default umask is `022` but some systems use `002`, which means +that files and directories are group writeable by default. + +You can override this for chezmoi by setting the `umask` configuration variable +in your configuration file, for example: + +```toml title="~/.config/chezmoi/chezmoi.toml" +umask = 0o022 +``` + +Note that this will apply to all files and directories that chezmoi manages and +will ensure that none of them are group writeable. It is not currently possible +to control group write permissions for individual files or directories. Please +[open an issue on +GitHub](https://github.com/twpayne/chezmoi/issues/new?assignees=&labels=enhancement&template=02_feature_request.md&title=) +if you need this. + +## chezmoi reports `chezmoi: user: lookup userid NNNNN: input/output error` + +This is likely because the chezmoi binary you are using was statically compiled +with [musl](https://musl.libc.org/) and the machine you are running on uses +LDAP or NIS. + +The immediate fix is to use a package built for your distribution (e.g a `.deb` +or `.rpm`) which is linked against glibc and includes LDAP/NIS support instead +of the statically-compiled binary. + +If the problem still persists, then please [open an issue on +GitHub](https://github.com/twpayne/chezmoi/issues/new/choose). + +## chezmoi reports `chezmoi: timeout` or `chezmoi: timeout obtaining persistent state lock` + +chezmoi will report this when it is unable to lock its persistent state +(`~/.config/chezmoi/chezmoistate.boltdb`), typically because another instance of +chezmoi is currently running and holding the lock. + +This can happen, for example, if you have a `run_` script that invokes +`chezmoi`, or are running chezmoi in another window. + +Under the hood, chezmoi uses [bbolt](https://github.com/etcd-io/bbolt) which +permits multiple simultaneous readers, but only one writer (with no readers). + +Commands that take a write lock include `add`, `apply`, `edit`, `forget`, +`import`, `init`, `state`, `unmanage`, and `update`. Commands that take a read +lock include `diff`, `status`, and `verify`. + diff --git a/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/usage.md b/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/usage.md new file mode 100644 index 00000000000..f6858f687b4 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/usage.md @@ -0,0 +1,74 @@ +# Usage + +## How do I edit my dotfiles with chezmoi? + +There are four popular approaches: + +1. Use `chezmoi edit $FILE`. This will open the source file for `$FILE` in your + editor, including . For extra ease, use `chezmoi edit --apply $FILE` to apply + the changes when you quit your editor. +2. Use `chezmoi cd` and edit the files in the source directory directly. Run + `chezmoi diff` to see what changes would be made, and `chezmoi apply` to make + the changes. +3. If your editor supports opening directories, run `chezmoi edit` with no + arguments to open the source directory. +4. Edit the file in your home directory, and then either re-add it by running + `chezmoi add $FILE` or `chezmoi re-add`. Note that `re-add` doesn't work with + templates. +5. Edit the file in your home directory, and then merge your changes with source + state by running `chezmoi merge $FILE`. + +## What are the consequences of "bare" modifications to the target files? If my `.zshrc` is managed by chezmoi and I edit `~/.zshrc` without using `chezmoi edit`, what happens? + +Until you run `chezmoi apply` your modified `~/.zshrc` will remain in place. +When you run `chezmoi apply` chezmoi will detect that `~/.zshrc` has changed +since chezmoi last wrote it and prompt you what to do. You can resolve +differences with a merge tool by running `chezmoi merge ~/.zshrc`. + +## How can I tell what dotfiles in my home directory aren't managed by chezmoi? Is there an easy way to have chezmoi manage a subset of them? + +`chezmoi unmanaged` will list everything not managed by chezmoi. You can add +entire directories with `chezmoi add`. + +## How can I tell what dotfiles in my home directory are currently managed by chezmoi? + +`chezmoi managed` will list everything managed by chezmoi. + +## If there's a mechanism in place for the above, is there also a way to tell chezmoi to ignore specific files or groups of files (e.g. by directory name or by glob)? + +By default, chezmoi ignores everything that you haven't explicitly added. If you +have files in your source directory that you don't want added to your +destination directory when you run `chezmoi apply` add their names to a file +called `.chezmoiignore` in the source state. + +Patterns are supported, and you can change what's ignored from machine to +machine. The full usage and syntax is described in the [reference +manual](/reference/special-files-and-directories/chezmoiignore/). + +## If the target already exists, but is "behind" the source, can chezmoi be configured to preserve the target version before replacing it with one derived from the source? + +Yes. Run `chezmoi add` will update the source state with the target. To see +diffs of what would change, without actually changing anything, use `chezmoi +diff`. + +## Once I've made a change to the source directory, how do I commit it? + +You have several options: + +* `chezmoi cd` opens a shell in the source directory, where you can run your + usual version control commands, like `git add` and `git commit`. + +* `chezmoi git` runs `git` in the source + directory and pass extra arguments to the command. If you're passing any + flags, you'll need to use `--` to prevent chezmoi from consuming them, for + example `chezmoi git -- commit -m "Update dotfiles"`. + +* You can configure chezmoi to automatically commit and push changes to your + source state, as [described in the how-to + guide](/user-guide/daily-operations/#automatically-commit-and-push-changes-to-your-repo). + +## I've made changes to both the destination state and the source state that I want to keep. How can I keep them both? + +`chezmoi merge` will open a merge tool to resolve differences between the source +state, target state, and destination state. Copy the changes you want to keep in +to the source state. diff --git a/assets/chezmoi.io/docs/user-guide/include-dotfiles-from-elsewhere.md b/assets/chezmoi.io/docs/user-guide/include-dotfiles-from-elsewhere.md new file mode 100644 index 00000000000..57aede9fa37 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/include-dotfiles-from-elsewhere.md @@ -0,0 +1,109 @@ +# Include dotfiles from elsewhere + +## Include a subdirectory from another repository, like Oh My Zsh + +To include a subdirectory from another repository, e.g. [Oh My +Zsh](https://github.com/ohmyzsh/ohmyzsh), you cannot use git submodules because +chezmoi uses its own format for the source state and Oh My Zsh is not +distributed in this format. Instead, you can use the +`.chezmoiexternal.<format>` to tell chezmoi to import dotfiles from an external +source. + +For example, to import Oh My Zsh, the [zsh-syntax-highlighting +plugin](https://github.com/zsh-users/zsh-syntax-highlighting), and +[powerlevel10k](https://github.com/romkatv/powerlevel10k), put the following in +`~/.local/share/chezmoi/.chezmoiexternal.toml`: + +```toml title="~/.local/share/chezmoi/.chezmoiexternal.toml" +[".oh-my-zsh"] + type = "archive" + url = "https://github.com/ohmyzsh/ohmyzsh/archive/master.tar.gz" + exact = true + stripComponents = 1 + refreshPeriod = "168h" +[".oh-my-zsh/custom/plugins/zsh-syntax-highlighting"] + type = "archive" + url = "https://github.com/zsh-users/zsh-syntax-highlighting/archive/master.tar.gz" + exact = true + stripComponents = 1 + refreshPeriod = "168h" +[".oh-my-zsh/custom/themes/powerlevel10k"] + type = "archive" + url = "https://github.com/romkatv/powerlevel10k/archive/v1.15.0.tar.gz" + exact = true + stripComponents = 1 +``` + +To apply the changes, run: + +```console +$ chezmoi apply +``` + +chezmoi will download the archives and unpack them as if they were part of the +source state. chezmoi caches downloaded archives locally to avoid +re-downloading them every time you run a chezmoi command, and will only +re-download them at most every `refreshPeriod` (default never). + +In the above example `refreshPeriod` is set to `168h` (one week) for +`.oh-my-zsh` and `.oh-my-zsh/custom/plugins/zsh-syntax-highlighting` because +the URL point to tarballs of the `master` branch, which changes over time. No +refresh period is set for `.oh-my-zsh/custom/themes/powerlevel10k` because the +URL points to the a tarball of a tagged version, which does not change over +time. To bump the version of powerlevel10k, change the version in the URL. + +To force a refresh the downloaded archives, use the `--refresh-externals` flag +to `chezmoi apply`: + +```console +$ chezmoi --refresh-externals apply +``` + +`--refresh-externals` can be shortened to `-R`: + +```console +$ chezmoi -R apply +``` + +When using Oh My Zsh, make sure you disable auto-updates by setting +`DISABLE_AUTO_UPDATE="true"` in `~/.zshrc`. Auto updates will cause the +`~/.oh-my-zsh` directory to drift out of sync with chezmoi's source state. To +update Oh My Zsh and its plugins, refresh the downloaded archives. + +## Include a single file from another repository + +Including single files uses the same mechanism as including a subdirectory +above, except with the external type `file` instead of `archive`. For example, +to include +[`plug.vim`](https://github.com/junegunn/vim-plug/blob/master/plug.vim) from +[`github.com/junegunn/vim-plug`](https://github.com/junegunn/vim-plug) in +`~/.vim/autoload/plug.vim` put the following in +`~/.local/share/chezmoi/.chezmoiexternal.toml`: + +```toml title="~/.local/share/chezmoi/.chezmoiexternal.toml" +[".vim/autoload/plug.vim"] + type = "file" + url = "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" + refreshPeriod = "168h" +``` + +## Import archives + +It is occasionally useful to import entire archives of configuration into your +source state. The `import` command does this. For example, to import the latest +version [`github.com/ohmyzsh/ohmyzsh`](https://github.com/ohmyzsh/ohmyzsh) to +`~/.oh-my-zsh` run: + +```console +$ curl -s -L -o ${TMPDIR}/oh-my-zsh-master.tar.gz https://github.com/ohmyzsh/ohmyzsh/archive/master.tar.gz +$ mkdir -p $(chezmoi source-path)/dot_oh-my-zsh +$ chezmoi import --strip-components 1 --destination ~/.oh-my-zsh ${TMPDIR}/oh-my-zsh-master.tar.gz +``` + +Note that this only updates the source state. You will need to run + +```console +$ chezmoi apply +``` + +to update your destination directory. diff --git a/assets/chezmoi.io/docs/user-guide/index.md b/assets/chezmoi.io/docs/user-guide/index.md new file mode 100644 index 00000000000..023ee7c7486 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/index.md @@ -0,0 +1 @@ +# User guide diff --git a/assets/chezmoi.io/docs/user-guide/machines/containers-and-vms.md b/assets/chezmoi.io/docs/user-guide/machines/containers-and-vms.md new file mode 100644 index 00000000000..052f3940135 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/machines/containers-and-vms.md @@ -0,0 +1,97 @@ +# Containers and VMs + +You can use chezmoi to manage your dotfiles in [GitHub +Codespaces](https://docs.github.com/en/github/developing-online-with-codespaces/personalizing-codespaces-for-your-account), +[Visual Studio +Codespaces](https://docs.microsoft.com/en/visualstudio/codespaces/reference/personalizing), +and [Visual Studio Code Remote - +Containers](https://code.visualstudio.com/docs/remote/containers#_personalizing-with-dotfile-repositories). + +For a quick start, you can clone the [`chezmoi/dotfiles` +repository](https://github.com/chezmoi/dotfiles) which supports Codespaces out +of the box. + +The workflow is different to using chezmoi on a new machine, notably: + +* These systems will automatically clone your `dotfiles` repo to `~/dotfiles`, + so there is no need to clone your repo yourself. + +* The installation script must be non-interactive. + +* When running in a Codespace, the environment variable `CODESPACES` will be + set to `true`. You can read its value with the [`env` template + function](http://masterminds.github.io/sprig/os.html). + +First, if you are using a chezmoi configuration file template, ensure that it +is non-interactive when running in Codespaces, for example, +`.chezmoi.toml.tmpl` might contain: + +``` +{{- $codespaces:= env "CODESPACES" | not | not -}} +sourceDir = {{ .chezmoi.sourceDir | quote }} + +[data] + name = "Your name" + codespaces = {{ $codespaces }} +{{- if $codespaces }}{{/* Codespaces dotfiles setup is non-interactive, so set an email address */}} + email = "[email protected]" +{{- else }}{{/* Interactive setup, so prompt for an email address */}} + email = {{ promptString "email" | quote }} +{{- end }} +``` + +This sets the `codespaces` template variable, so you don't have to repeat `(env +"CODESPACES")` in your templates. It also sets the `sourceDir` configuration to +the `--source` argument passed in `chezmoi init`. + +Second, create an `install.sh` script that installs chezmoi and your dotfiles: + +```sh +#!/bin/sh + +set -e # -e: exit on error + +if [ ! "$(command -v chezmoi)" ]; then + bin_dir="$HOME/.local/bin" + chezmoi="$bin_dir/chezmoi" + if [ "$(command -v curl)" ]; then + sh -c "$(curl -fsLS https://chezmoi.io/get)" -- -b "$bin_dir" + elif [ "$(command -v wget)" ]; then + sh -c "$(wget -qO- https://chezmoi.io/get)" -- -b "$bin_dir" + else + echo "To install chezmoi, you must have curl or wget installed." >&2 + exit 1 + fi +else + chezmoi=chezmoi +fi + +# POSIX way to get script's dir: https://stackoverflow.com/a/29834779/12156188 +script_dir="$(cd -P -- "$(dirname -- "$(command -v -- "$0")")" && pwd -P)" +# exec: replace current process with chezmoi init +exec "$chezmoi" init --apply "--source=$script_dir" +``` + +Ensure that this file is executable (`chmod a+x install.sh`), and add +`install.sh` to your `.chezmoiignore` file. + +It installs the latest version of chezmoi in `~/.local/bin` if needed, and then +`chezmoi init ...` invokes chezmoi to create its configuration file and +initialize your dotfiles. `--apply` tells chezmoi to apply the changes +immediately, and `--source=...` tells chezmoi where to find the cloned +`dotfiles` repo, which in this case is the same folder in which the script is +running from. + +If you do not use a chezmoi configuration file template you can use `chezmoi +apply --source=$HOME/dotfiles` instead of `chezmoi init ...` in `install.sh`. + +Finally, modify any of your templates to use the `codespaces` variable if +needed. For example, to install `vim-gtk` on Linux but not in Codespaces, your +`run_once_install-packages.sh.tmpl` might contain: + +``` +{{- if (and (eq .chezmoi.os "linux") (not .codespaces)) -}} +#!/bin/sh +sudo apt install -y vim-gtk +{{- end -}} +``` diff --git a/assets/chezmoi.io/docs/user-guide/machines/general.md b/assets/chezmoi.io/docs/user-guide/machines/general.md new file mode 100644 index 00000000000..50680c72bb6 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/machines/general.md @@ -0,0 +1,21 @@ +# General + +## Determine whether the current machine is a laptop or desktop + +The following template sets the `$chassisType` variable to `"desktop"` or +`"laptop"` on macOS, Linux, and Windows. + +``` +{{- $chassisType := "desktop" }} +{{- if (eq .chezmoi.os "darwin") }} +{{- if contains "MacBook" (output "sysctl" "-n" "hw.model") }} +{{- $chassisType = "laptop" }} +{{- else }} +{{- $chassisType = "desktop" }} +{{- end }} +{{- else if (eq .chezmoi.os "linux") }} +{{- $chassisType = (output "hostnamectl" "--json=short" | mustFromJson).Chassis }} +{{- else if (eq .chezmoi.os "windows") }} +{{- $chassisType = (output "powershell.exe" "-noprofile" "-command" "if (Get-WmiObject -Class win32_battery -ComputerName localhost) { echo laptop } else { echo desktop }") }} +{{- end }} +``` diff --git a/assets/chezmoi.io/docs/user-guide/machines/macos.md b/assets/chezmoi.io/docs/user-guide/machines/macos.md new file mode 100644 index 00000000000..c5baeca8e48 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/machines/macos.md @@ -0,0 +1,34 @@ +# macOS + +## Use `brew bundle` to manage your brews and casks + +Homebrew's [`brew bundle` +subcommand](https://docs.brew.sh/Manpage#bundle-subcommand) allows you to +specify a list of brews and casks to be installed. You can integrate this with +chezmoi by creating a `run_once_` script. For example, create a file in your +source directory called `run_once_before_install-packages-darwin.sh.tmpl` +containing: + +``` +{{- if (eq .chezmoi.os "darwin") -}} +#!/bin/bash + +brew bundle --no-lock --file=/dev/stdin <<EOF +brew "git" +cask "google-chrome" +EOF +{{ end -}} +``` + +Note that the `Brewfile` is embedded directly in the script with a bash here +document. chezmoi will run this script whenever its contents change, i.e. when +you add or remove brews or casks. + +### Determine the hostname + +The result of the command `hostname` on macOS depends on the network that the +machine is connected to. For a stable result, use the `scutil` command: + +``` +{{ $computerName := output "scutil" "--get" "ComputerName" | trim }} +``` diff --git a/assets/chezmoi.io/docs/user-guide/machines/windows.md b/assets/chezmoi.io/docs/user-guide/machines/windows.md new file mode 100644 index 00000000000..292b6984fa3 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/machines/windows.md @@ -0,0 +1,30 @@ +# Windows + +## Detect Windows Subsystem for Linux (WSL) + +WSL can be detected by looking for the string `Microsoft` or `microsoft` in +`/proc/sys/kernel/osrelease`, which is available in the template variable +`.chezmoi.kernel.osrelease`, for example: + +``` +{{ if (eq .chezmoi.os "linux") }} +{{ if (.chezmoi.kernel.osrelease | lower | contains "microsoft") }} +# WSL-specific code +{{ end }} +{{ end }} +``` + +## Run a PowerShell script as admin on Windows + +Put the following at the top of your script: + +```powershell +# Self-elevate the script if required +if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { + if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) { + $CommandLine = "-NoExit -File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments + Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine + Exit + } +} +``` diff --git a/assets/chezmoi.io/docs/user-guide/manage-different-types-of-file.md b/assets/chezmoi.io/docs/user-guide/manage-different-types-of-file.md new file mode 100644 index 00000000000..191a0c53fab --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/manage-different-types-of-file.md @@ -0,0 +1,145 @@ +# Manage different types of file + +## Have chezmoi create a directory, but ignore its contents + +If you want chezmoi to create a directory, but ignore its contents, say +`~/src`, first run: + +```console +$ mkdir -p $(chezmoi source-path)/src +``` + +This creates the directory in the source state, which means that chezmoi will +create it (if it does not already exist) when you run `chezmoi apply`. + +However, as this is an empty directory it will be ignored by git. So, create a +file in the directory in the source state that will be seen by git (so git does +not ignore the directory) but ignored by chezmoi (so chezmoi does not include it +in the target state): + +```console +$ touch $(chezmoi source-path)/src/.keep +``` + +chezmoi automatically creates `.keep` files when you add an empty directory +with `chezmoi add`. + +## Ensure that a target is removed + +Create a file called `.chezmoiremove` in the source directory containing a list +of patterns of files to remove. chezmoi will remove anything in the target +directory that matches the pattern. As this command is potentially dangerous, +you should run chezmoi in verbose, dry-run mode beforehand to see what would be +removed: + +```console +$ chezmoi apply --dry-run --verbose +``` + +`.chezmoiremove` is interpreted as a template, so you can remove different +files on different machines. Negative matches (patterns prefixed with a `!`) or +targets listed in `.chezmoiignore` will never be removed. + +## Manage part, but not all, of a file + +chezmoi, by default, manages whole files, but there are two ways to manage just +parts of a file. + +Firstly, a `modify_` script receives the current contents of the file on the +standard input and chezmoi reads the target contents of the file from the +script's standard output. This can be used to change parts of a file, for +example using `sed`. Note that if the file does not exist then the standard +input to the `modify_` script will be empty and it is the script's +responsibility to write a complete file to the standard output. + +Secondly, if only a small part of the file changes then consider using a +template to re-generate the full contents of the file from the current state. +For example, Kubernetes configurations include a current context that can be +substituted with: + +``` title="~/.local/share/chezmoi/dot_kube/config.tmpl" +current-context: {{ output "kubectl" "config" "current-context" | trim }} +``` + +## Manage a file's permissions, but not its contents + +chezmoi's `create_` attributes allows you to tell chezmoi to create a file if +it does not already exist. chezmoi, however, will apply any permission changes +from the `executable_`, `private_`, and `readonly_` attributes. This can be +used to control a file's permissions without altering its contents. + +For example, if you want to ensure that `~/.kube/config` always has permissions +600 then if you create an empty file called `dot_kube/private_dot_config` in +your source state, chezmoi will ensure `~/.kube/config`'s permissions are 0600 +when you run `chezmoi apply` without changing its contents. + +This approach does have the downside that chezmoi will create the file if it +does not already exist. If you only want `chezmoi apply` to set a file's +permissions if it already exists and not create the file otherwise, you can use +a `run_` script. For example, create a file in your source state called +`run_set_kube_config_permissions.sh` containing: + +```bash +#!/bin/sh + +FILE="$HOME/.kube/config" +if [ -f "$FILE" ]; then + if [ "$(stat -c %a "$FILE")" != "600" ] ; then + chmod 600 "$FILE" + fi +fi +``` + +## Handle configuration files which are externally modified + +Some programs modify their configuration files. When you next run `chezmoi +apply`, any modifications made by the program will be lost. + +You can track changes to these files by replacing with a symlink back to a file +in your source directory, which is under version control. Here is a worked +example for VSCode's `settings.json` on Linux: + +Copy the configuration file to your source directory: + +```console +$ cp ~/.config/Code/User/settings.json $(chezmoi source-path) +``` + +Tell chezmoi to ignore this file: + +```console +$ echo settings.json >> $(chezmoi source-path)/.chezmoiignore +``` + +Tell chezmoi that `~/.config/Code/User/settings.json` should be a symlink to +the file in your source directory: + +```console +$ mkdir -p $(chezmoi source-path)/private_dot_config/private_Code/User +$ echo -n "{{ .chezmoi.sourceDir }}/settings.json" > $(chezmoi source-path)/private_dot_config/private_Code/User/symlink_settings.json.tmpl +``` + +The prefix `private_` is used because the `~/.config` and `~/.config/Code` +directories are private by default. + +Apply the changes: + +```console +$ chezmoi apply -v +``` + +Now, when the program modifies its configuration file it will modify the file +in the source state instead. + +## Populate `~/.ssh/authorized_keys` with your public SSH keys from GitHub + +chezmoi can retrieve your public SSH keys from GitHub, which can be useful for +populating your `~/.ssh/authorized_keys`. Put the following in your +`~/.local/share/chezmoi/dot_ssh/authorized_keys.tmpl`, where `username` is your +GitHub username: + +``` +{{ range (gitHubKeys "username") -}} +{{ .Key }} +{{ end -}} +``` diff --git a/assets/chezmoi.io/docs/user-guide/manage-machine-to-machine-differences.md b/assets/chezmoi.io/docs/user-guide/manage-machine-to-machine-differences.md new file mode 100644 index 00000000000..0ddcae7f518 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/manage-machine-to-machine-differences.md @@ -0,0 +1,237 @@ +# Manage machine-to-machine differences + +## Use templates + +The primary goal of chezmoi is to manage configuration files across multiple +machines, for example your personal macOS laptop, your work Ubuntu desktop, and +your work Linux laptop. You will want to keep much configuration the same +across these, but also need machine-specific configurations for email +addresses, credentials, etc. chezmoi achieves this functionality by using +[`text/template`](https://pkg.go.dev/text/template) for the source state where +needed. + +For example, your home `~/.gitconfig` on your personal machine might look like: + +```toml title="~/.gitconfig" +[user] + email = "[email protected]" +``` + +Whereas at work it might be: + +```toml title="~/.gitconfig" +[user] + email = "[email protected]" +``` + +To handle this, on each machine create a configuration file called +`~/.config/chezmoi/chezmoi.toml` defining variables that might vary from +machine to machine. For example, for your home machine: + +```toml title="~/.config/chezmoi/chezmoi.toml" +[data] + email = "[email protected]" +``` + +Note that all variable names will be converted to lowercase. This is due to a +feature of a library used by chezmoi. + +If you intend to store private data (e.g. access tokens) in +`~/.config/chezmoi/chezmoi.toml`, make sure it has permissions `0600`. + +If you prefer, you can use any format supported by +[Viper](https://github.com/spf13/viper) for your configuration file. This +includes JSON, YAML, and TOML. Variable names must start with a letter and be +followed by zero or more letters or digits. + +Then, add `~/.gitconfig` to chezmoi using the `--autotemplate` flag to turn it +into a template and automatically detect variables from the `data` section of +your `~/.config/chezmoi/chezmoi.toml` file: + +```console +$ chezmoi add --autotemplate ~/.gitconfig +``` + +You can then open the template (which will be saved in the file +`~/.local/share/chezmoi/dot_gitconfig.tmpl`): + +```console +$ chezmoi edit ~/.gitconfig +``` + +The file should look something like: + +```toml title="~/.local/share/chezmoi/dot_gitconfig.tmpl" +[user] + email = {{ .email | quote }} +``` + +To disable automatic variable detection, use the `--template` or `-T` option to +`chezmoi add` instead of `--autotemplate`. + +Templates are often used to capture machine-specific differences. For example, +in your `~/.local/share/chezmoi/dot_bashrc.tmpl` you might have: + +``` title="~/.local/share/chezmoi/dot_bashrc.tmpl" +# common config +export EDITOR=vi + +# machine-specific configuration +{{- if eq .chezmoi.hostname "work-laptop" }} +# this will only be included in ~/.bashrc on work-laptop +{{- end }} +``` + +For a full list of variables, run: + +```console +$ chezmoi data +``` + +For more advanced usage, you can use the full power of the +[`text/template`](https://pkg.go.dev/text/template) language. chezmoi includes +all of the text functions from [sprig](http://masterminds.github.io/sprig/) and +its own [functions for interacting with password +managers](/reference/templates/functions/). + +Templates can be executed directly from the command line, without the need to +create a file on disk, with the `execute-template` command, for example: + +```console +$ chezmoi execute-template "{{ .chezmoi.os }}/{{ .chezmoi.arch }}" +``` + +This is useful when developing or debugging templates. + +Some password managers allow you to store complete files. The files can be +retrieved with chezmoi's template functions. For example, if you have a file +stored in 1Password with the UUID `uuid` then you can retrieve it with the +template: + +``` +{{- onepasswordDocument "uuid" -}} +``` + +The `-`s inside the brackets remove any whitespace before or after the template +expression, which is useful if your editor has added any newlines. + +If, after executing the template, the file contents are empty, the target file +will be removed. This can be used to ensure that files are only present on +certain machines. If you want an empty file to be created anyway, you will need +to give it an `empty_` prefix. + +## Ignore files or a directory on different machines + +For coarser-grained control of files and entire directories managed on +different machines, or to exclude certain files completely, you can create +`.chezmoiignore` files in the source directory. These specify a list of +patterns that chezmoi should ignore, and are interpreted as templates. An +example `.chezmoiignore` file might look like: + +``` title="~/.local/share/chezmoi/.chezmoiignore" +README.md +{{- if ne .chezmoi.hostname "work-laptop" }} +.work # only manage .work on work-laptop +{{- end }} +``` + +The use of `ne` (not equal) is deliberate. What we want to achieve is "only +install `.work` if hostname is `work-laptop`" but chezmoi installs everything +by default, so we have to turn the logic around and instead write "ignore +`.work` unless the hostname is `work-laptop`". + +Patterns can be excluded by prefixing them with a `!`, for example: + +``` title="~/.local/share/chezmoi/.chezmoiignore" +f* +!foo +``` + +will ignore all files beginning with an `f` except `foo`. + +## Handle different file locations on different systems with the same contents + +If you want to have the same file contents in different locations on different +systems, but maintain only a single file in your source state, you can use a +shared template. + +Create the common file in the `.chezmoitemplates` directory in the source +state. For example, create `.chezmoitemplates/file.conf`. The contents of this +file are available in templates with the `template *name* .` function where +*name* is the name of the file (`.` passes the current data to the template +code in `file.conf`; see https://pkg.go.dev/text/template#hdr-Actions for +details). + +Then create files for each system, for example `Library/Application +Support/App/file.conf.tmpl` for macOS and `dot_config/app/file.conf.tmpl` for +Linux. Both template files should contain `{{- template "file.conf" . -}}`. + +Finally, tell chezmoi to ignore files where they are not needed by adding lines +to your `.chezmoiignore` file, for example: + +``` title="~/.local/share/chezmoi/.chezmoiignore" +{{ if ne .chezmoi.os "darwin" }} +Library/Application Support/App/file.conf +{{ end }} +{{ if ne .chezmoi.os "linux" }} +.config/app/file.conf +{{ end }} +``` + +## Use completely different dotfiles on different machines + +chezmoi's template functionality allows you to change a file's contents based +on any variable. For example, if you want `~/.bashrc` to be different on Linux +and macOS you would create a file in the source state called `dot_bashrc.tmpl` +containing: + +``` title="~/.local/share/chezmoi/.chezmoiignore" +{{ if eq .chezmoi.os "darwin" -}} +# macOS .bashrc contents +{{ else if eq .chezmoi.os "linux" -}} +# Linux .bashrc contents +{{ end -}} +``` + +However, if the differences between the two versions are so large that you'd +prefer to use completely separate files in the source state, you can achieve +this using a symbolic link template. Create the following files: + +``` title="~/.local/share/chezmoi/symlink_dot_bashrc.tmpl" +.bashrc_{{ .chezmoi.os }} +``` + +```bash title="~/.local/share/chezmoi/dot_bashrc_darwin" +# macOS .bashrc contents +``` + +```bash title="~/.local/share/chezmoi/dot_bashrc_linux" +# Linux .bashrc contents +``` + +``` title="~/.local/share/chezmoi/.chezmoiignore" +{{ if ne .chezmoi.os "darwin" }} +.bashrc_darwin +{{ end }} +{{ if ne .chezmoi.os "linux" }} +.bashrc_linux +{{ end }} +``` + +This will make `~/.bashrc` a symlink to `.bashrc_darwin` on `darwin` and to +`.bashrc_linux` on `linux`. The `.chezmoiignore` configuration ensures that +only the OS-specific `.bashrc_os` file will be installed on each OS. + +### Without using symlinks + +The same thing can be achieved using the include function. + +``` title="~/.local/share/chezmoi/dot_bashrc.tmpl" +{{ if eq .chezmoi.os "darwin" }} +{{ include ".bashrc_darwin" }} +{{ end }} +{{ if eq .chezmoi.os "linux" }} +{{ include ".bashrc_linux" }} +{{ end }} +``` + diff --git a/assets/chezmoi.io/docs/user-guide/password-managers/1password.md b/assets/chezmoi.io/docs/user-guide/password-managers/1password.md new file mode 100644 index 00000000000..09c0eb56677 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/password-managers/1password.md @@ -0,0 +1,70 @@ +# 1Password + +chezmoi includes support for [1Password](https://1password.com/) using the +[1Password CLI](https://support.1password.com/command-line-getting-started/) to +expose data as a template function. + +Log in and get a session using: + +```console +$ eval $(op signin <subdomain>.1password.com <email>) +``` + +The output of `op get item <uuid>` is available as the `onepassword` template +function. chezmoi parses the JSON output and returns it as structured data. For +example, if the output of `op get item "<uuid>"` is: + +```json +{ + "uuid": "<uuid>", + "details": { + "password": "xxx" + } +} +``` + +Then you can access `details.password` with the syntax: + +``` +{{ (onepassword "<uuid>").details.password }} +``` + +Login details fields can be retrieved with the `onepasswordDetailsFields` +function, for example: + +``` +{{- (onepasswordDetailsFields "uuid").password.value }} +``` + +Documents can be retrieved with: + +``` +{{- onepasswordDocument "uuid" -}} +``` + +Note the extra `-` after the opening `{{` and before the closing `}}`. This +instructs the template language to remove any whitespace before and after the +substitution. This removes any trailing newline added by your editor when +saving the template. + +## 1Password sign-in prompt + +chezmoi will verify the availability and validity of a session token in the +current environment. If it is missing or expired, you will be interactively +prompted to sign-in again. + +In the past chezmoi used to simply exit with an error when no valid session was +available. If you'd like to restore that behavior, set the following option in +your configuration file: + +```toml title="~/.config/chezmoi/chezmoi.toml" +[onepassword] + prompt = false +``` + +!!! warning + + A session token verified or acquired interactively will be passed to the + 1Password CLI through a command-line parameter, which could be visible to + other users of the same system. You should disable the prompt on shared + machines for improved security. diff --git a/assets/chezmoi.io/docs/user-guide/password-managers/bitwarden.md b/assets/chezmoi.io/docs/user-guide/password-managers/bitwarden.md new file mode 100644 index 00000000000..5905f1238eb --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/password-managers/bitwarden.md @@ -0,0 +1,35 @@ +# Bitwarden + +chezmoi includes support for [Bitwarden](https://bitwarden.com/) using the +[Bitwarden CLI](https://github.com/bitwarden/cli) to expose data as a template +function. + +Log in to Bitwarden using: + +```console +$ bw login <bitwarden-email> +``` + +Unlock your Bitwarden vault: + +```console +$ bw unlock +``` + +Set the `BW_SESSION` environment variable, as instructed. + +The structured data from `bw get` is available as the `bitwarden` template +function in your config files, for example: + +``` +username = {{ (bitwarden "item" "example.com").login.username }} +password = {{ (bitwarden "item" "example.com").login.password }} +``` + +Custom fields can be accessed with the `bitwardenFields` template function. For +example, if you have a custom field named `token` you can retrieve its value +with: + +``` +{{ (bitwardenFields "item" "example.com").token.value }} +``` diff --git a/assets/chezmoi.io/docs/user-guide/password-managers/custom.md b/assets/chezmoi.io/docs/user-guide/password-managers/custom.md new file mode 100644 index 00000000000..03a4656b1f6 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/password-managers/custom.md @@ -0,0 +1,17 @@ +# Custom + +You can use any command line tool that outputs secrets either as a string or in +JSON format. Choose the binary by setting `secret.command` in your +configuration file. You can then invoke this command with the `secret` and +`secretJSON` template functions which return the raw output and JSON-decoded +output respectively. All of the above secret managers can be supported in this +way: + +| Secret Manager | `secret.command` | Template skeleton | +| --------------- | ---------------- | ------------------------------------------------- | +| 1Password | `op` | `{{ secretJSON "get" "item" <id> }}` | +| Bitwarden | `bw` | `{{ secretJSON "get" <id> }}` | +| HashiCorp Vault | `vault` | `{{ secretJSON "kv" "get" "-format=json" <id> }}` | +| LastPass | `lpass` | `{{ secretJSON "show" "--json" <id> }}` | +| KeePassXC | `keepassxc-cli` | Not possible (interactive command only) | +| pass | `pass` | `{{ secret "show" <id> }}` | diff --git a/assets/chezmoi.io/docs/user-guide/password-managers/gopass.md b/assets/chezmoi.io/docs/user-guide/password-managers/gopass.md new file mode 100644 index 00000000000..559347517b4 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/password-managers/gopass.md @@ -0,0 +1,11 @@ +# gopass + +chezmoi includes support for [gopass](https://www.gopass.pw/) using the gopass +CLI. + +The first line of the output of `gopass show <pass-name>` is available as the +`gopass` template function, for example: + +``` +{{ gopass "<pass-name>" }} +``` diff --git a/assets/chezmoi.io/docs/user-guide/password-managers/index.md b/assets/chezmoi.io/docs/user-guide/password-managers/index.md new file mode 100644 index 00000000000..a756ba8a73b --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/password-managers/index.md @@ -0,0 +1,6 @@ +# Password manager integration + +Template functions allow you to retrieve secrets from many popular password +managers. Using a password manager allows you to keep all your secrets in one +place, make your dotfiles repo public, and synchronize changes to secrets +across multiple machines. diff --git a/assets/chezmoi.io/docs/user-guide/password-managers/keepassxc.md b/assets/chezmoi.io/docs/user-guide/password-managers/keepassxc.md new file mode 100644 index 00000000000..1134c13824a --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/password-managers/keepassxc.md @@ -0,0 +1,27 @@ +# KeePassXC + +chezmoi includes support for [KeePassXC](https://keepassxc.org) using the +KeePassXC CLI (`keepassxc-cli`) to expose data as a template function. + +Provide the path to your KeePassXC database in your configuration file: + +```toml title="~/.config/chezmoi/chezmoi.toml" +[keepassxc] + database = "/home/user/Passwords.kdbx" +``` + +The structured data from `keepassxc-cli show $database` is available as the +`keepassxc` template function in your config files, for example: + +``` +username = {{ (keepassxc "example.com").UserName }} +password = {{ (keepassxc "example.com").Password }} +``` + +Additional attributes are available through the `keepassxcAttribute` function. +For example, if you have an entry called `SSH Key` with an additional attribute +called `private-key`, its value is available as: + +``` +{{ keepassxcAttribute "SSH Key" "private-key" }} +``` diff --git a/assets/chezmoi.io/docs/user-guide/password-managers/keychain-and-windows-credentials-manager.md b/assets/chezmoi.io/docs/user-guide/password-managers/keychain-and-windows-credentials-manager.md new file mode 100644 index 00000000000..3a97ba050f6 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/password-managers/keychain-and-windows-credentials-manager.md @@ -0,0 +1,36 @@ +# Keychain and Windows Credentials Manager + +chezmoi includes support for Keychain (on macOS), GNOME Keyring (on Linux), and +Windows Credentials Manager (on Windows) via the +[`zalando/go-keyring`](https://github.com/zalando/go-keyring) library. + +Set values with: + +```console +$ chezmoi secret keyring set --service=<service> --user=<user> +Value: xxxxxxxx +``` + +The value can then be used in templates using the `keyring` function which +takes the service and user as arguments. + +For example, save a GitHub access token in keyring with: + +```console +$ chezmoi secret keyring set --service=github --user=<github-username> +Value: xxxxxxxx +``` + +and then include it in your `~/.gitconfig` file with: + +``` +[github] + user = {{ .github.user | quote }} + token = {{ keyring "github" .github.user | quote }} +``` + +You can query the keyring from the command line: + +```console +$ chezmoi secret keyring get --service=github --user=<github-username> +``` diff --git a/assets/chezmoi.io/docs/user-guide/password-managers/lastpass.md b/assets/chezmoi.io/docs/user-guide/password-managers/lastpass.md new file mode 100644 index 00000000000..4b343f0a30a --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/password-managers/lastpass.md @@ -0,0 +1,48 @@ +# LastPass + +chezmoi includes support for [LastPass](https://lastpass.com) using the +[LastPass CLI](https://lastpass.github.io/lastpass-cli/lpass.1.html) to expose +data as a template function. + +Log in to LastPass using: + +```console +$ lpass login <lastpass-username> +``` + +Check that `lpass` is working correctly by showing password data: + +``` console +$ lpass show --json <lastpass-entry-id> +``` + +where `<lastpass-entry-id>` is a [LastPass Entry +Specification](https://lastpass.github.io/lastpass-cli/lpass.1.html#_entry_specification). + +The structured data from `lpass show --json id` is available as the `lastpass` +template function. The value will be an array of objects. You can use the +`index` function and `.Field` syntax of the `text/template` language to extract +the field you want. For example, to extract the `password` field from first the +"GitHub" entry, use: + +``` +githubPassword = {{ (index (lastpass "GitHub") 0).password | quote }} +``` + +chezmoi automatically parses the `note` value of the Lastpass entry as +colon-separated key-value pairs, so, for example, you can extract a private SSH +key like this: + +``` +{{ (index (lastpass "SSH") 0).note.privateKey }} +``` + +Keys in the `note` section written as `CamelCase Words` are converted to +`camelCaseWords`. + +If the `note` value does not contain colon-separated key-value pairs, then you +can use `lastpassRaw` to get its raw value, for example: + +``` +{{ (index (lastpassRaw "SSH Private Key") 0).note }} +``` diff --git a/assets/chezmoi.io/docs/user-guide/password-managers/pass.md b/assets/chezmoi.io/docs/user-guide/password-managers/pass.md new file mode 100644 index 00000000000..4afb9f3040d --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/password-managers/pass.md @@ -0,0 +1,11 @@ +# pass + +chezmoi includes support for [pass](https://www.passwordstore.org/) using the +pass CLI. + +The first line of the output of `pass show <pass-name>` is available as the +`pass` template function, for example: + +``` +{{ pass "<pass-name>" }} +``` diff --git a/assets/chezmoi.io/docs/user-guide/password-managers/vault.md b/assets/chezmoi.io/docs/user-guide/password-managers/vault.md new file mode 100644 index 00000000000..fcdbd91e6ce --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/password-managers/vault.md @@ -0,0 +1,21 @@ +# Vault + +chezmoi includes support for [Vault](https://www.vaultproject.io/) using the +[Vault CLI](https://www.vaultproject.io/docs/commands/) to expose data as a +template function. + +The vault CLI needs to be correctly configured on your machine, e.g. the +`VAULT_ADDR` and `VAULT_TOKEN` environment variables must be set correctly. +Verify that this is the case by running: + +```console +$ vault kv get -format=json <key> +``` + +The structured data from `vault kv get -format=json` is available as the +`vault` template function. You can use the `.Field` syntax of the +`text/template` language to extract the data you want. For example: + +``` +{{ (vault "<key>").data.data.password }} +``` diff --git a/assets/chezmoi.io/docs/user-guide/setup.md b/assets/chezmoi.io/docs/user-guide/setup.md new file mode 100644 index 00000000000..b4adc3cc816 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/setup.md @@ -0,0 +1,119 @@ +# Setup + +## Use a hosted repo to manage your dotfiles across multiple machines + +chezmoi relies on your version control system and hosted repo to share changes +across multiple machines. You should create a repo on the source code repository +of your choice (e.g. [Bitbucket](https://bitbucket.org), +[GitHub](https://github.com/), or [GitLab](https://gitlab.com), many people call +their repo `dotfiles`) and push the repo in the source directory here. For +example: + +```console +$ chezmoi cd +$ git remote add origin https://github.com/username/dotfiles.git +$ git push -u origin main +$ exit +``` + +On another machine you can checkout this repo: + +```console +$ chezmoi init https://github.com/username/dotfiles.git +``` + +You can then see what would be changed: + +```console +$ chezmoi diff +``` + +If you're happy with the changes then apply them: + +```console +$ chezmoi apply +``` + +The above commands can be combined into a single init, checkout, and apply: + +```console +$ chezmoi init --apply --verbose https://github.com/username/dotfiles.git +``` + +## Use a private repo to store your dotfiles + +chezmoi supports storing your dotfiles in both public and private repos. + +chezmoi is designed so that your dotfiles repo can be public by making it easy +for you to store your secrets either in your password manager, in encrypted +files, or in private configuration files. Your dotfiles repo can still be +private, if you choose. + +If you use a private repo for your dotfiles then you will typically need to +enter your credentials (e.g. your username and password) each time you interact +with the repo, for example when pulling or pushing changes. chezmoi itself does +not store any credentials, but instead relies on your local git configuration +for these operations. + +When using a private repo on GitHub without `--ssh`, when prompted for a +password you will need to enter a [GitHub personal access +token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token). +For more information on these changes, read the [GitHub blog post on Token +authentication requirements for Git +operations](https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/) + +## Create a config file on a new machine automatically + +`chezmoi init` can also create a config file automatically, if one does not +already exist. If your repo contains a file called `.chezmoi.<format>.tmpl` +where *format* is one of the supported config file formats (e.g. `json`, +`toml`, or `yaml`) then `chezmoi init` will execute that template to generate +your initial config file. + +Specifically, if you have `.chezmoi.toml.tmpl` that looks like this: + +``` title="~/.config/chezmoi/chezmoi.toml" +{{- $email := promptString "email" -}} + +[data] + email = {{ $email | quote }} +``` + +Then `chezmoi init` will create an initial `chezmoi.toml` using this template. +`promptString` is a special function that prompts the user (you) for a value. + +To test this template, use `chezmoi execute-template` with the `--init` and +`--promptString` flags, for example: + +```console +$ chezmoi execute-template --init --promptString [email protected] < ~/.local/share/chezmoi/.chezmoi.toml.tmpl +``` + +## Re-create your config file + +If you change your config file template, chezmoi will warn you if your current +config file was not generated from that template. You can re-generate your +config file by running: + +```console +$ chezmoi init +``` + +If you are using any `prompt*` template functions in your config file template +you will be prompted again. However, you can avoid this with the following +example template logic: + +``` +{{- $email := "" -}} +{{- if (hasKey . "email") -}} +{{- $email = .email -}} +{{- else -}} +{{- $email = promptString "email" -}} +{{- end -}} + +[data] + email = {{ $email | quote }} +``` + +This will cause chezmoi to first try to re-use the existing `$email` variable +and fallback to `promptString` only if it is not set. diff --git a/docs/TEMPLATING.md b/assets/chezmoi.io/docs/user-guide/templating.md similarity index 80% rename from docs/TEMPLATING.md rename to assets/chezmoi.io/docs/user-guide/templating.md index 389fd927b1b..a4da9ff5d7b 100644 --- a/docs/TEMPLATING.md +++ b/assets/chezmoi.io/docs/user-guide/templating.md @@ -1,29 +1,4 @@ -# chezmoi templating guide - -<!--- toc ---> -* [Introduction](#introduction) -* [Template data](#template-data) -* [Creating a template file](#creating-a-template-file) -* [Editing a template file](#editing-a-template-file) -* [Testing templates](#testing-templates) -* [Template syntax](#template-syntax) - * [Removing whitespace](#removing-whitespace) -* [Debugging templates](#debugging-templates) -* [Simple logic](#simple-logic) - * [Boolean functions](#boolean-functions) - * [Integer functions](#integer-functions) -* [More complicated logic](#more-complicated-logic) - * [Chaining operators](#chaining-operators) -* [Helper functions](#helper-functions) -* [Template variables](#template-variables) -* [Using `.chezmoitemplates`](#using-chezmoitemplates) -* [Using `.chezmoitemplates` for creating similar files](#using-chezmoitemplates-for-creating-similar-files) - * [Passing multiple arguments](#passing-multiple-arguments) -* [Useful templates](#useful-templates) - * [Determine whether the current machine is a laptop or desktop](#determine-whether-the-current-machine-is-a-laptop-or-desktop) - * [Determine the hostname of a macOS machine](#determine-the-hostname-of-a-macos-machine) - ---- +# Templating ## Introduction @@ -39,11 +14,10 @@ When reading files from the source state, chezmoi interprets them as a template if either of the following is true: * The file name has a `.tmpl` suffix. + * The file is in the `.chezmoitemplates` directory, or a subdirectory of `.chezmoitemplates`. ---- - ## Template data chezmoi provides a variety of template variables. For a full list, run @@ -55,57 +29,57 @@ $ chezmoi data These come from a variety of sources (later data overwrite earlier ones): * Variables populated by chezmoi are in `.chezmoi`, for example `.chezmoi.os`. + * Variables created by you in the `.chezmoidata.<format>` configuration file. The various supported formats (json, toml and yaml) are read in alphabetical order. + * Variables created by you in the `data` section of the configuration file. Furthermore, chezmoi provides a variety of functions to retrieve data at runtime from password managers, environment variables, and the filesystem. ---- - ## Creating a template file There are several ways to create a template: * When adding a file for the first time, pass the `--template` argument, for example: -```console -$ chezmoi add --template ~/.zshrc -``` + ```console + $ chezmoi add --template ~/.zshrc + ``` * When adding a file for the first time, you can pass the `--autotemplate` argument, which tells chezmoi to make the file as a template and automatically replace variables that chezmoi knows about, for example: -```console -$ chezmoi add --autotemplate ~/.zshrc -``` + ```console + $ chezmoi add --autotemplate ~/.zshrc + ``` * If a file is already managed by chezmoi, but is not a template, you can make it a template by running, for example: -```console -$ chezmoi chattr +template ~/.zshrc -``` + ```console + $ chezmoi chattr +template ~/.zshrc + ``` * You can create a template manually in the source directory by giving it a `.tmpl` extension, for example: -```console -$ chezmoi cd -$ $EDITOR dot_zshrc.tmpl -``` + ```console + $ chezmoi cd + $ $EDITOR dot_zshrc.tmpl + ``` * Templates in `.chezmoitemplates` must be created manually, for example: - chezmoi cd - mkdir -p .chezmoitemplates - cd .chezmoitemplates - $EDITOR mytemplate - ---- + ```console + $ chezmoi cd + $ mkdir -p .chezmoitemplates + $ cd .chezmoitemplates + $ $EDITOR mytemplate + ``` ## Editing a template file @@ -125,8 +99,6 @@ editor, use the `--apply` option, for example: $ chezmoi edit --apply ~/.zshrc ``` ---- - ## Testing templates Templates can be tested with the `chezmoi execute-template` command which treats @@ -145,8 +117,6 @@ $ chezmoi cd $ chezmoi execute-template < dot_zshrc.tmpl ``` ---- - ## Template syntax Template actions are written inside double curly brackets, `{{` and `}}`. @@ -175,8 +145,6 @@ for example: For a full description of the template syntax, see the [`text/template` documentation](https://pkg.go.dev/text/template). ---- - ### Removing whitespace For formatting reasons you might want to leave some whitespace after or before @@ -200,8 +168,6 @@ HOSTNAME=myhostname Notice that this will remove any number of tabs, spaces and even newlines and carriage returns. ---- - ## Debugging templates If there is a mistake in one of your templates and you want to debug it, chezmoi @@ -225,8 +191,6 @@ You can also feed the contents of a file to this command by typing: $ cat foo.txt | chezmoi execute-template ``` ---- - ## Simple logic A very useful feature of chezmoi templates is the ability to perform logical @@ -246,8 +210,6 @@ In this example chezmoi will look at the hostname of the machine and if that is equal to "work-laptop", the text between the `if` and the `end` will be included in the result. ---- - ### Boolean functions | Function | Return value | @@ -257,8 +219,6 @@ in the result. | `and` | Returns the boolean AND of its arguments by returning the first empty argument or the last argument, that is, `and x y` behaves as `if x then y else x`. All the arguments are evaluated | | `or` | Returns the boolean OR of its arguments by returning the first non-empty argument or the last argument, that is, `or x y` behaves as `if x then x else y` All the arguments are evaluated | ---- - ### Integer functions | Function | Return value | @@ -271,8 +231,6 @@ in the result. | `gt` | Returns the boolean truth of arg1 > arg2 | | `ge` | Returns the boolean truth of arg1 >= arg2 | ---- - ## More complicated logic Up until now, we have only seen if statements that can handle at most two @@ -293,8 +251,6 @@ nothing. The operators `or` and `and` can also accept multiple arguments. ---- - ### Chaining operators You can perform multiple checks in one if statement. @@ -311,8 +267,6 @@ arguments will be give to the `and` command. This way you can chain as many operators together as you like. ---- - ## Helper functions chezmoi has added multiple helper functions to the @@ -323,16 +277,13 @@ the `text/template` format that contains many helper functions. Take a look at their documentation for a list. chezmoi adds a few functions of its own as well. Take a look at the -[reference](https://github.com/twpayne/chezmoi/blob/master/docs/REFERENCE.md#template-functions) -for complete list. - ---- +[reference](/reference/templates/functions/) for complete list. ## Template variables chezmoi defines a few useful templates variables that depend on the system you are currently on. A list of the variables defined by chezmoi can be found -[here](https://github.com/twpayne/chezmoi/blob/master/docs/REFERENCE.md#template-variables). +[here](/reference/templates/variables/). There are, however more variables than that. To view the variables available on your system, execute: @@ -350,8 +301,6 @@ This outputs the variables in JSON format by default. To access the variable This way you can also access the variables you defined yourself. ---- - ## Using `.chezmoitemplates` Files in the `.chezmoitemplates` subdirectory are parsed as templates and are @@ -377,8 +326,6 @@ dot_file.tmpl: {{ template "part.tmpl" . }} ``` ---- - ## Using `.chezmoitemplates` for creating similar files When you have multiple similar files, but they aren't quite the same, you can @@ -422,22 +369,18 @@ fontsize: 18 more: config ``` ---- - ### Passing multiple arguments In the example above only one arguments is passed to the template. To pass more arguments to the template, you can do it in two ways. ---- - #### Via the config file This method is useful if you want to use the same template arguments multiple times, because you don't specify the arguments every time. Instead you specify -them in the file `.config/chezmoi/.chezmoi.toml`: +them in the file `.config/chezmoi/chezmoi.toml`: -```toml +```toml title="~/.config/chezmoi/chezmoi.toml" [data.alacritty.big] fontsize = 18 font = "DejaVu Serif" @@ -448,7 +391,7 @@ them in the file `.config/chezmoi/.chezmoi.toml`: Use the variables in `.local/share/chezmoi/.chezmoitemplates/alacritty`: -``` +``` title="~/.local/share/chezmoi/.chezmoitemplates/alacritty" some: config fontsize: {{ .fontsize }} font: {{ .font }} @@ -457,57 +400,18 @@ more: config And connect them with `.local/share/chezmoi/small-font.yml.tmpl`: -``` +``` title="~/.local/share/chezmoi/small-font.yml.tmpl" {{- template "alacritty" .alacritty.small -}} ``` At the moment, this means that you'll have to duplicate the alacritty data in the config file on every machine, but a feature will be added to avoid this. ---- - #### By passing a dictionary Using the same alacritty configuration as above, you can pass the arguments to it with a dictionary, for example `.local/share/chezmoi/small-font.yml.tmpl`: -``` +``` title="~/.local/share/chezmoi/small-font.yml.tmpl" {{- template "alacritty" dict "fontsize" 12 "font" "DejaVu Sans Mono" -}} ``` - ---- - -## Useful templates - ---- - -### Determine whether the current machine is a laptop or desktop - -The following template sets the `$chassisType` variable to `"desktop"` or -`"laptop"` on macOS, Linux, and Windows. - -``` -{{- $chassisType := "desktop" }} -{{- if (eq .chezmoi.os "darwin") }} -{{- if contains "MacBook" (output "sysctl" "-n" "hw.model") }} -{{- $chassisType = "laptop" }} -{{- else }} -{{- $chassisType = "desktop" }} -{{- end }} -{{- else if (eq .chezmoi.os "linux") }} -{{- $chassisType = (output "hostnamectl" "--json=short" | mustFromJson).Chassis }} -{{- else if (eq .chezmoi.os "windows") }} -{{- $chassisType = (output "powershell.exe" "-noprofile" "-command" "if (Get-WmiObject -Class win32_battery -ComputerName localhost) { echo laptop } else { echo desktop }") }} -{{- end }} -``` - ---- - -### Determine the hostname of a macOS machine - -The result of the command `hostname` on macOS depends on the network that the -machine is connected to. For a stable result, use the `scutil` command: - -``` -{{ $computerName := output "scutil" "--get" "ComputerName" | trim }} -``` diff --git a/assets/chezmoi.io/docs/user-guide/tools/diff.md b/assets/chezmoi.io/docs/user-guide/tools/diff.md new file mode 100644 index 00000000000..31229103b1d --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/tools/diff.md @@ -0,0 +1,42 @@ +# Diff + +## Use a custom diff tool + +By default, chezmoi uses a built-in diff. You can use a custom tool by setting +the `diff.command` and `diff.args` configuration variables. The elements of +`diff.args` are interpreted as templates with the variables `.Destination` and +`.Target` containing filenames of the file in the destination state and the +target state respectively. For example, to use [meld](https://meldmerge.org/), +specify: + +```toml title="~/.config/chezmoi/chezmoi.toml" +[diff] + command = "meld" + args = ["--diff", "{{ .Destination }}", "{{ .Target }}"] +``` + +## Don't show scripts in the diff output + +By default, `chezmoi diff` will show all changes, including the contents of +scripts that will be run. You can exclude scripts from the diff output by +setting the `diff.exclude` configuration variable in your configuration file, +for example: + +```toml title="~/.config/chezmoi/chezmoi.toml" +[diff] + exclude = ["scripts"] +``` + +## Customize the diff pager + +You can change the diff format, and/or pipe the output into a pager of your +choice by setting `diff.pager` configuration variable. For example, to use +[`diff-so-fancy`](https://github.com/so-fancy/diff-so-fancy) specify: + +```toml title="~/.config/chezmoi/chezmoi.toml" +[diff] + pager = "diff-so-fancy" +``` + +The pager can be disabled using the `--no-pager` flag or by setting `diff.pager` +to an empty string. diff --git a/assets/chezmoi.io/docs/user-guide/tools/editor.md b/assets/chezmoi.io/docs/user-guide/tools/editor.md new file mode 100644 index 00000000000..6c65affc0a1 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/tools/editor.md @@ -0,0 +1,39 @@ +# Editor + +## Use your preferred editor with `chezmoi edit` and `chezmoi edit-config` + +By default, chezmoi will use your preferred editor as defined by the `$VISUAL` +or `$EDITOR` environment variables, falling back to a default editor depending +on your operating system (`vi` on UNIX-like operating systems, `notepad.exe` on +Windows). + +You can configure chezmoi to use your preferred editor by either setting the +`$EDITOR` environment variable or setting the `edit.command` variable in your +configuration file. + +The editor command must only return when you have finished editing the files. +chezmoi will emit a warning if your editor command returns too quickly. + +In the specific case of using [VSCode](https://code.visualstudio.com/) or +[Codium](https://vscodium.com/) as your editor, you must pass the `--wait` +flag, for example, in your shell config: + +```console +$ export EDITOR="code --wait" +``` + +Or in chezmoi's configuration file: + +```toml title="~/.config/chezmoi/chezmoi.toml" +[edit] + command = "code" + args = ["--wait"] +``` + +## Configure VIM to run `chezmoi apply` whenever you save a dotfile + +Put the following in your `.vimrc`: + +```vim title="~/.vimrc" +autocmd BufWritePost ~/.local/share/chezmoi/* ! chezmoi apply --source-path "%" +``` diff --git a/assets/chezmoi.io/docs/user-guide/tools/http-or-socks5-proxy.md b/assets/chezmoi.io/docs/user-guide/tools/http-or-socks5-proxy.md new file mode 100644 index 00000000000..83c67a7a1ba --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/tools/http-or-socks5-proxy.md @@ -0,0 +1,9 @@ +# HTTP or SOCKS5 proxy + +chezmoi supports HTTP, HTTPS, and SOCKS5 proxies. Set the `HTTP_PROXY`, +`HTTPS_PROXY`, and `NO_PROXY` environment variables, or their lowercase +equivalents, for example: + +```console +$ HTTP_PROXY=socks5://127.0.0.1:1080 chezmoi apply --refresh-externals +``` diff --git a/assets/chezmoi.io/docs/user-guide/tools/index.md b/assets/chezmoi.io/docs/user-guide/tools/index.md new file mode 100644 index 00000000000..40986faedf9 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/tools/index.md @@ -0,0 +1 @@ +# Tools diff --git a/assets/chezmoi.io/docs/user-guide/tools/merge.md b/assets/chezmoi.io/docs/user-guide/tools/merge.md new file mode 100644 index 00000000000..6251acdf356 --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/tools/merge.md @@ -0,0 +1,16 @@ +# Merge + +## Use a custom merge command + +By default, chezmoi uses `vimdiff.` You can use a custom command by setting the +`merge.command` and `merge.args` configuration variables. The elements of +`merge.args` are interprested as templates with the variables `.Destination`, +`.Source`, and `.Target` containing filenames of the file in the destination +state, source state, and target state respectively. For example, to use +[neovim's diff mode](https://neovim.io/doc/user/diff.html), specify: + +```toml title="~/.config/chezmoi/chezmoi.toml" +[merge] + command = "nvim" + args = ["-d", "{{ .Destination }}", "{{ .Source }}", "{{ .Target }}"] +``` diff --git a/assets/chezmoi.io/docs/user-guide/tools/pager.md b/assets/chezmoi.io/docs/user-guide/tools/pager.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/assets/chezmoi.io/docs/user-guide/use-scripts-to-perform-actions.md b/assets/chezmoi.io/docs/user-guide/use-scripts-to-perform-actions.md new file mode 100644 index 00000000000..077b96ef27a --- /dev/null +++ b/assets/chezmoi.io/docs/user-guide/use-scripts-to-perform-actions.md @@ -0,0 +1,103 @@ +# Use scripts to perform actions + +## Understand how scripts work + +chezmoi supports scripts, which are executed when you run `chezmoi apply`. The +scripts can either run every time you run `chezmoi apply`, or only when their +contents have changed. + +In verbose mode, the script's contents will be printed before executing it. In +dry-run mode, the script is not executed. + +Scripts are any file in the source directory with the prefix `run_`, and are +executed in alphabetical order. Scripts that should only be run if they have +not been run before have the prefix `run_once_`. Scripts that should be run +whenever their contents change have the `run_onchange_` prefix. + +Scripts break chezmoi's declarative approach, and as such should be used +sparingly. Any script should be idempotent, even `run_once_` and +`run_onchange_` scripts. + +Scripts must be created manually in the source directory, typically by running +`chezmoi cd` and then creating a file with a `run_` prefix. Scripts are +executed directly using `exec` and must include a shebang line or be executable +binaries. There is no need to set the executable bit on the script. + +Scripts with the suffix `.tmpl` are treated as templates, with the usual +template variables available. If, after executing the template, the result is +only whitespace or an empty string, then the script is not executed. This is +useful for disabling scripts. + +## Install packages with scripts + +Change to the source directory and create a file called +`run_once_install-packages.sh`: + +```console +$ chezmoi cd +$ $EDITOR run_once_install-packages.sh +``` + +In this file create your package installation script, e.g. + +```sh +#!/bin/sh +sudo apt install ripgrep +``` + +The next time you run `chezmoi apply` or `chezmoi update` this script will be +run. As it has the `run_once_` prefix, it will not be run again unless its +contents change, for example if you add more packages to be installed. + +This script can also be a template. For example, if you create +`run_once_install-packages.sh.tmpl` with the contents: + +``` title="~/.local/share/chezmoi/run_once_install-packages.sh.tmpl" +{{ if eq .chezmoi.os "linux" -}} +#!/bin/sh +sudo apt install ripgrep +{{ else if eq .chezmoi.os "darwin" -}} +#!/bin/sh +brew install ripgrep +{{ end -}} +``` + +This will install `ripgrep` on both Debian/Ubuntu Linux systems and macOS. + +## Run a script when the contents of another file changes + +chezmoi's `run_` scripts are run every time you run `chezmoi apply`, whereas +`run_once_` scripts are run only when their contents have changed, after +executing them as templates. You use this to cause a `run_once_` script to run +when the contents of another file has changed by including a checksum of the +other file's contents in the script. + +For example, if your [dconf](https://wiki.gnome.org/Projects/dconf) settings +are stored in `dconf.ini` in your source directory then you can make `chezmoi +apply` only load them when the contents of `dconf.ini` has changed by adding +the following script as `run_once_dconf-load.sh.tmpl`: + +``` title="~/.local/share/chezmoi/run_once_dconf-load.sh.tmpl" +#!/bin/bash + +# dconf.ini hash: {{ include "dconf.ini" | sha256sum }} +dconf load / {{ joinPath .chezmoi.sourceDir "dconf.ini" | quote }} +``` + +As the SHA256 sum of `dconf.ini` is included in a comment in the script, the +contents of the script will change whenever the contents of `dconf.ini` are +changed, so chezmoi will re-run the script whenever the contents of `dconf.ini` +change. + +In this example you should also add `dconf.ini` to `.chezmoiignore` so chezmoi +does not create `dconf.ini` in your home directory. + +## Clear the state of `run_once_` scripts + +chezmoi stores whether and when `run_once_` scripts have been run in the +`scriptState` bucket of its persistent state. To clear the state of `run_once_` +scripts, run: + +```console +$ chezmoi state delete-bucket --bucket=scriptState +``` diff --git a/assets/chezmoi.io/docs/what-does-chezmoi-do.md b/assets/chezmoi.io/docs/what-does-chezmoi-do.md new file mode 100644 index 00000000000..7348248ba06 --- /dev/null +++ b/assets/chezmoi.io/docs/what-does-chezmoi-do.md @@ -0,0 +1,78 @@ +# What does chezmoi do? + +chezmoi helps you manage your personal configuration files (dotfiles, like +`~/.gitconfig`) across multiple machines. + +chezmoi is helpful if you have spent time customizing the tools you use (e.g. +shells, editors, and version control systems) and want to keep machines running +different accounts (e.g. home and work) and/or different operating systems +(e.g. Linux, macOS, and Windows) in sync, while still being able to easily cope +with differences from machine to machine. + +chezmoi scales from the trivial (e.g. copying a few dotfiles onto a Raspberry +Pi, development container, or virtual machine) to complex long-lived +multi-machine development environments (e.g. keeping any number of home and +work, Linux, macOS, and Windows machines in sync). In all cases you only need +to maintain a single source of truth (a single branch in git) and getting +started only requires adding a single binary to your machine (which you can do +with `curl`, `wget`, or `scp`). + +chezmoi has strong support for security, allowing you to manage secrets (e.g. +passwords, access tokens, and private keys) securely and seamlessly using a +password manager and/or encrypt whole files with your favorite encryption tool. + +If you do not personalize your configuration or only ever use a single +operating system with a single account and none of your dotfiles contain +secrets then you don't need chezmoi. Otherwise, read on... + +## What are chezmoi's key features? + +### Flexible + +You can share as much configuration across machines as you want, while still +being able to control machine-specific details.Your dotfiles can be templates +(using [`text/template`](https://pkg.go.dev/text/template) syntax). Predefined +variables allow you to change behavior depending on operating system, +architecture, and hostname. chezmoi runs on all commonly-used platforms, like +Linux, macOS, and Windows. It also runs on less commonly-used platforms, like +FreeBSD, OpenBSD, and Termux. + +### Personal and secure + +Nothing leaves your machine, unless you want it to. Your configuration remains +in a git repo under your control. You can write the configuration file in the +format of your choice. chezmoi can retrieve secrets from +[1Password](https://1password.com/), [Bitwarden](https://bitwarden.com/), +[gopass](https://www.gopass.pw/), [KeePassXC](https://keepassxc.org/), +[LastPass](https://lastpass.com/), [pass](https://www.passwordstore.org/), +[Vault](https://www.vaultproject.io/), Keychain, +[Keyring](https://wiki.gnome.org/Projects/GnomeKeyring), or any command-line +utility of your choice. You can encrypt individual files with +[GnuPG](https://www.gnupg.org) or [age](https://age-encryption.org). You can +checkout your dotfiles repo on as many machines as you want without revealing +any secrets to anyone. + +### Transparent + +chezmoi includes verbose and dry run modes so you can review exactly what +changes it will make to your home directory before making them. chezmoi's +source format uses only regular files and directories that map one-to-one with +the files, directories, and symlinks in your home directory that you choose to +manage. If you decide not to use chezmoi in the future, it is easy to move your +data elsewhere. + +### Declarative and robust + +You declare the desired state of files, directories, and symbolic links in your +source of truth and chezmoi updates your home directory to match that state. +What you want is what you get. chezmoi updates all files and symbolic links +atomically. You will never be left with incomplete files that could lock you +out, even if the update process is interrupted. + +### Fast and easy to use + +Using chezmoi feels like using git: the commands are similar and chezmoi runs +in fractions of a second. chezmoi makes most day-to-day operations one line +commands, including installation, initialization, and keeping your machines +up-to-date. chezmoi can pull and apply changes from your dotfiles repo in a +single command, and automatically commit and push changes. diff --git a/assets/chezmoi.io/docs/why-use-chezmoi.md b/assets/chezmoi.io/docs/why-use-chezmoi.md new file mode 100644 index 00000000000..7e2a700db44 --- /dev/null +++ b/assets/chezmoi.io/docs/why-use-chezmoi.md @@ -0,0 +1,142 @@ +# Why use chezmoi? + +## Why should I use a dotfile manager? + +Dotfile managers give you the combined benefit of a consistent environment +everywhere with an undo command and a restore from backup. + +As the core of our development environments become increasingly standardized +(e.g. using git at both home and work), and we further customize them with our, +at the same time we increasingly work in ephemeral environments like Docker +containers, virtual machines, and GitHub Codespaces. + +In the same way that nobody would use an editor without an undo command, or +develop software without a version control system, chezmoi brings the +investment that you have made in mastering your tools to every environment that +you work in. + +## I already have a system to manage my dotfiles, why should I use chezmoi? + +!!! quote + + I’ve been using Chezmoi for more than a year now, across at least 3 + computers simultaneously, and I really love it. Most of all, I love how + fast I can configure a new machine when I use it. In just a couple minutes + of work, I can kick off a process on a brand-new computer that will set up + my dotfiles and install all my usual software so it feels like a computer + I’ve been using for years. I also appreciate features like secrets + management, which allow me to share my dotfiles while keeping my secrets + safe. Overall, I love the way Chezmoi fits so perfectly into the niche of + managing dotfiles. + + - [@mike_kasberg](https://www.mikekasberg.com/blog/2021/05/12/my-dotfiles-story.html) + +!!! quote + + Regular reminder that chezmoi is the best dotfile manager utility I've used + and you can too + + — [@mbbroberg](https://twitter.com/mbbroberg/status/1355644967625125892) + +If you're using any of the following methods: + +* A custom shell script. + +* An existing dotfile manager like + [dotbot](https://github.com/anishathalye/dotbot), + [rcm](https://github.com/thoughtbot/rcm), + [homesick](https://github.com/technicalpickles/homesick), + [vcsh](https://github.com/RichiH/vcsh), + [yadm](https://yadm.io/), or [GNU Stow](https://www.gnu.org/software/stow/). + +* A [bare git repo](https://www.atlassian.com/git/tutorials/dotfiles). + +Then you've probably run into at least one of the following problems. + +### ...if coping with differences between machines requires extra effort + +If you want to synchronize your dotfiles across multiple operating systems or +distributions, then you may need to manually perform extra steps to cope with +differences from machine to machine. You might need to run different commands on +different machines, maintain separate per-machine files or branches (with the +associated hassle of merging, rebasing, or copying each change), or hope that +your custom logic handles the differences correctly. + +chezmoi uses a single source of truth (a single branch) and a single command +that works on every machine. Individual files can be templates to handle machine +to machine differences, if needed. + +### ...if you have to keep your dotfiles repo private + +!!! quote + + And regarding dotfiles, I saw that. It's only public dotfiles repos so I + have to evaluate my dotfiles history to be sure. I have secrets scanning + and more, but it was easier to keep it private for security, I'm ok mostly + though. I'm using chezmoi and it's easier now + + — [@sheldon_hull](https://twitter.com/sheldon_hull/status/1308139570597371907) + +If your system stores secrets in plain text, then you must be very careful about +where you clone your dotfiles. If you clone them on your work machine then +anyone with access to your work machine (e.g. your IT department) will have +access to your home secrets. If you clone it on your home machine then you risk +leaking work secrets. + +With chezmoi you can store secrets in your password manager or encrypt them, and +even store passwords in different ways on different machines. You can clone your +dotfiles repository anywhere, and even make your dotfiles repo public, without +leaving personal secrets on your work machine or work secrets on your personal +machine. + +### ...if you have to maintain your own tool + +!!! quote + + I've offloaded my dotfiles deployment from a homespun shell script to chezmoi. + I'm quite happy with this decision. + + — [@gotgenes](https://twitter.com/gotgenes/status/1251008845163319297) + +!!! quote + + I discovered chezmoi and it's pretty cool, just migrated my old custom + multi-machine sync dotfile setup and it's so much simpler now + + in case you're wondering I have written 0 code + + — [@buritica](https://twitter.com/buritica/status/1361062902451630089) + +!!! quote + + Chezmoi is like what you might get if you re-wrote my bash script in Go, + came up with better solutions than `diff` for managing config on multiple + machines, added in secrets management and other useful dotfile tools, and + tweaked and perfected it over years. + + - [@mike_kasberg](https://www.mikekasberg.com/blog/2021/05/12/my-dotfiles-story.html) + +If your system was written by you for your personal use, then it probably has +the functionality that you needed when you wrote it. If you need more +functionality then you have to implement it yourself. + +chezmoi includes a huge range of battle-tested functionality out-of-the-box, +including dry-run and diff modes, script execution, conflict resolution, Windows +support, and much, much more. chezmoi is [used by thousands of +people](https://github.com/twpayne/chezmoi/stargazers) and has a rich suite of +both unit and integration tests. When you hit the limits of your existing +dotfile management system, chezmoi already has a tried-and-tested solution ready +for you to use. + +### ...if setting up your dotfiles requires more than one short command + +If your system is written in a scripting language like Python, Perl, or Ruby, +then you also need to install a compatible version of that language's runtime +before you can use your system. + +chezmoi is distributed as a single stand-alone statically-linked binary with no +dependencies that you can simply copy onto your machine and run. You don't even +need git installed. chezmoi provides one-line installs, pre-built binaries, +packages for Linux and BSD distributions, Homebrew formulae, Scoop and +Chocolatey support on Windows, and a initial config file generation mechanism to +make installing your dotfiles on a new machine as painless as possible. diff --git a/assets/chezmoi.io/make-gh-pages.sh b/assets/chezmoi.io/make-gh-pages.sh deleted file mode 100755 index 999ae7ab4ba..00000000000 --- a/assets/chezmoi.io/make-gh-pages.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -# generate the new website -rm -rf public/ -hugo - -# clone and checkout the gh-pages branch in a temporary directory -tmpdir=$(mktemp -d) -cleanup() { - rm -rf "${tmpdir}" -} -trap cleanup EXIT -git branch -f gh-pages origin/gh-pages -git clone --branch=gh-pages --local ../.. "${tmpdir}" - -# copy the new website to the temporary directory -rm -rf "${tmpdir:?}"/* -cp -r public/* "${tmpdir}" - -# prepare the clone -cd "${tmpdir}" -git checkout CNAME -git remote set-url origin https://github.com/twpayne/chezmoi.git -git fetch origin -git reset origin/gh-pages - -# commit the new website -if ! git diff --quiet; then - git add . - git commit --message "Update gh-pages" -fi - -# give the user the opportunity to push the new website -echo "run git push to push the new website" - -${SHELL} diff --git a/assets/chezmoi.io/mkdocs.yml b/assets/chezmoi.io/mkdocs.yml new file mode 100644 index 00000000000..c1fab7668dd --- /dev/null +++ b/assets/chezmoi.io/mkdocs.yml @@ -0,0 +1,230 @@ +site_name: chezmoi +site_url: https://chezmoi.io +site_description: Manage your dotfiles across multiple machines, securely. +site_author: Tom Payne +copyright: Copyright © Tom Payne 2018-2022 +repo_name: twpayne/chezmoi +repo_url: https://github.com/twpayne/chezmoi +edit_uri: edit/master/assets/chezmoi.io/docs/ + +theme: + name: material + logo: logo-144px.svg + language: en + features: + - navigation.expand + - navigation.indexes + - navigation.sections + - navigation.tabs + - navigation.top + - navigation.tracking + +nav: +- Home: + - index.md + - Install: install.md + - Quick start: quick-start.md + - What does chezmoi do?: what-does-chezmoi-do.md + - Why use chezmoi?: why-use-chezmoi.md + - Comparison table: comparison-table.md + - Migrating from another dotfile manager: migrating-from-another-dotfile-manager.md +- User guide: + - user-guide/index.md + - Setup: user-guide/setup.md + - Daily operations: user-guide/daily-operations.md + - Manage different types of file: user-guide/manage-different-types-of-file.md + - Include dotfiles from elsewhere: user-guide/include-dotfiles-from-elsewhere.md + - Manage machine-to-machine differences: user-guide/manage-machine-to-machine-differences.md + - Use scripts to perform actions: user-guide/use-scripts-to-perform-actions.md + - Templating: user-guide/templating.md + - Tools: + - user-guide/tools/index.md + - Editor: user-guide/tools/editor.md + - Diff: user-guide/tools/diff.md + - Merge: user-guide/tools/merge.md + - Pager: user-guide/tools/pager.md + - HTTP or SOCKS5 proxy: user-guide/tools/http-or-socks5-proxy.md + - Password managers: + - user-guide/password-managers/index.md + - 1Password: user-guide/password-managers/1password.md + - Bitwarden: user-guide/password-managers/bitwarden.md + - gopass: user-guide/password-managers/gopass.md + - KeePassXC: user-guide/password-managers/keepassxc.md + - Keychain and Windows Credentials Manager: user-guide/password-managers/keychain-and-windows-credentials-manager.md + - LastPass: user-guide/password-managers/lastpass.md + - pass: user-guide/password-managers/pass.md + - Vault: user-guide/password-managers/vault.md + - Custom: user-guide/password-managers/custom.md + - Encryption: + - user-guide/encryption/index.md + - age: user-guide/encryption/age.md + - gpg: user-guide/encryption/gpg.md + - Machines: + - General: user-guide/machines/general.md + - macOS: user-guide/machines/macos.md + - Windows: user-guide/machines/windows.md + - Containers and VMs: user-guide/machines/containers-and-vms.md + - Advanced: + - Customize your source directory: user-guide/advanced/customize-your-source-directory.md + - Migrate away from chezmoi: user-guide/advanced/migrate-away-from-chezmoi.md + - Frequently asked questions: + - user-guide/frequently-asked-questions/index.md + - Usage: user-guide/frequently-asked-questions/usage.md + - Troubleshooting: user-guide/frequently-asked-questions/troubleshooting.md + - Design: user-guide/frequently-asked-questions/design.md + - General: user-guide/frequently-asked-questions/general.md +- Reference: + - reference/index.md + - Concepts: reference/concepts.md + - Source state attributes: reference/source-state-attributes.md + - Target types: reference/target-types.md + - Application order: reference/application-order.md + - Command line flags: + - reference/command-line-flags/index.md + - Global: reference/command-line-flags/global.md + - Common: reference/command-line-flags/common.md + - Developer: reference/command-line-flags/developer.md + - Configuration file: + - reference/configuration-file/index.md + - Variables: reference/configuration-file/variables.md + - Editor: reference/configuration-file/editor.md + - pinentry: reference/configuration-file/pinentry.md + - umask: reference/configuration-file/umask.md + - Special files and directories: + - reference/special-files-and-directories/index.md + - .chezmoi.&lt;format&gt;.tmpl: reference/special-files-and-directories/chezmoi-format-tmpl.md + - .chezmoidata.&lt;format&gt;: reference/special-files-and-directories/chezmoidata-format.md + - .chezmoiexternal.&lt;format&gt;: reference/special-files-and-directories/chezmoiexternal-format.md + - .chezmoiignore: reference/special-files-and-directories/chezmoiignore.md + - .chezmoiremove: reference/special-files-and-directories/chezmoiremove.md + - .chezmoiroot: reference/special-files-and-directories/chezmoiroot.md + - .chezmoiscripts: reference/special-files-and-directories/chezmoiscripts.md + - .chezmoitemplates: reference/special-files-and-directories/chezmoitemplates.md + - .chezmoiversion: reference/special-files-and-directories/chezmoiversion.md + - Commands: + - reference/commands/index.md + - add: reference/commands/add.md + - apply: reference/commands/apply.md + - archive: reference/commands/archive.md + - cat: reference/commands/cat.md + - cd: reference/commands/cd.md + - chattr: reference/commands/chattr.md + - completion: reference/commands/completion.md + - data: reference/commands/data.md + - decrypt: reference/commands/decrypt.md + - diff: reference/commands/diff.md + - doctor: reference/commands/doctor.md + - dump: reference/commands/dump.md + - edit: reference/commands/edit.md + - edit-config: reference/commands/edit-config.md + - encrypt: reference/commands/encrypt.md + - execute-template: reference/commands/execute-template.md + - forget: reference/commands/forget.md + - git: reference/commands/git.md + - help: reference/commands/help.md + - init: reference/commands/init.md + - import: reference/commands/import.md + - list: reference/commands/list.md + - manage: reference/commands/manage.md + - managed: reference/commands/managed.md + - merge: reference/commands/merge.md + - merge-all: reference/commands/merge-all.md + - purge: reference/commands/purge.md + - remove: reference/commands/remove.md + - re-add: reference/commands/re-add.md + - rm: reference/commands/rm.md + - secret: reference/commands/secret.md + - source-path: reference/commands/source-path.md + - state: reference/commands/state.md + - status: reference/commands/status.md + - unmanage: reference/commands/unmanage.md + - unmanaged: reference/commands/unmanaged.md + - update: reference/commands/update.md + - upgrade: reference/commands/upgrade.md + - verify: reference/commands/verify.md + - Templates: + - reference/templates/index.md + - Variables: reference/templates/variables.md + - Functions: + - reference/templates/functions/index.md + - bitwarden: reference/templates/functions/bitwarden.md + - bitwardenAttachment: reference/templates/functions/bitwardenAttachment.md + - bitwardenFields: reference/templates/functions/bitwardenFields.md + - decrypt: reference/templates/functions/decrypt.md + - encrypt: reference/templates/functions/encrypt.md + - exit: reference/templates/functions/exit.md + - fromYaml: reference/templates/functions/fromYaml.md + - gitHubKeys: reference/templates/functions/gitHubKeys.md + - gitHubLatestRelease: reference/templates/functions/gitHubLatestRelease.md + - gopass: reference/templates/functions/gopass.md + - gopassRaw: reference/templates/functions/gopassRaw.md + - include: reference/templates/functions/include.md + - ioreg: reference/templates/functions/ioreg.md + - joinPath: reference/templates/functions/joinPath.md + - keepassxc: reference/templates/functions/keepassxc.md + - keepassxcAttribute: reference/templates/functions/keepassxcAttribute.md + - keyring: reference/templates/functions/keyring.md + - lastpass: reference/templates/functions/lastpass.md + - lastpassRaw: reference/templates/functions/lastpassRaw.md + - lookPath: reference/templates/functions/lookPath.md + - mozillaInstallHash: reference/templates/functions/mozillaInstallHash.md + - onepassword: reference/templates/functions/onepassword.md + - onepasswordDocument: reference/templates/functions/onepasswordDocument.md + - onepasswordDetailsFields: reference/templates/functions/onepasswordDetailsFields.md + - onepasswordItemFields: reference/templates/functions/onepasswordItemFields.md + - output: reference/templates/functions/output.md + - pass: reference/templates/functions/pass.md + - passFields: reference/templates/functions/passFields.md + - passRaw: reference/templates/functions/passRaw.md + - promptBool: reference/templates/functions/promptBool.md + - promptInt: reference/templates/functions/promptInt.md + - promptString: reference/templates/functions/promptString.md + - secret: reference/templates/functions/secret.md + - secretJSON: reference/templates/functions/secretJSON.md + - stat: reference/templates/functions/stat.md + - stdinIsATTY: reference/templates/functions/stdinIsATTY.md + - toYaml: reference/templates/functions/toYaml.md + - vault: reference/templates/functions/vault.md + - writeToStdout: reference/templates/functions/writeToStdout.md +- Developer: + - Developing locally: developer/developing-locally.md + - Contributing changes: developer/contributing-changes.md + - Website: developer/website.md + - Install script: developer/install-script.md + - Using make: developer/using-make.md + - Releases: developer/releases.md + - Packaging: developer/packaging.md + - Security: developer/security.md + - Architecture: developer/architecture.md +- Links: + - Articles, podcasts, and videos: links/articles-podcasts-and-videos.md + - Dotfile repos using chezmoi: links/dotfile-repos-using-chezmoi.md + - Related software: links/related-software.md + +markdown_extensions: +- admonition +- meta +- pymdownx.details +- pymdownx.superfences +- pymdownx.tabbed: + alternate_style: true + +plugins: +- search +- redirects: + redirect_maps: + # redirect links from previous Hugo-generated website + docs/architecture.md: developer/architecture.md + docs/comparison.md: comparison-table.md + docs/faq.md: user-guide/frequently-asked-questions/index.md + docs/how-to.md: user-guide/index.md + docs/install.md: install.md + docs/media.md: links/articles-podcasts-and-videos.md + docs/quick-start.md: quick-start.md + docs/reference.md: reference/index.md + docs/related.md: links/related-software.md + docs/security.md: developer/security.md + docs/templating.md: user-guide/templating.md +- mkdocs-simple-hooks: + hooks: + on_post_build: "docs.hooks:on_post_build" diff --git a/assets/chezmoi.io/themes/book b/assets/chezmoi.io/themes/book deleted file mode 160000 index 2f60f0919f8..00000000000 --- a/assets/chezmoi.io/themes/book +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2f60f0919f80a8ad745ef47953f638392af6d37f diff --git a/docs/CHANGES.md b/docs/CHANGES.md deleted file mode 100644 index 18bf5d2f52b..00000000000 --- a/docs/CHANGES.md +++ /dev/null @@ -1,134 +0,0 @@ -# chezmoi changes - -<!--- toc ---> -* [Overview](#overview) -* [Version 2](#version-2) - * [New features in version 2](#new-features-in-version-2) - * [Changes from version 1](#changes-from-version-1) - ---- - -## Overview - -This document describes what's new in chezmoi v2 for chezmoi v1 users. - -If you're not using a dotfile manager, then read [why you should you use a -dotfile -manager](https://github.com/twpayne/chezmoi/blob/master/docs/COMPARISON.md#why-should-i-use-a-dotfile-manager) -and then [install -chezmoi](https://github.com/twpayne/chezmoi/blob/master/docs/INSTALL.md) and -follow the [quick-start -guide](https://github.com/twpayne/chezmoi/blob/master/docs/QUICKSTART.md). - -If you're already using a dotfile manager, but not chezmoi, then read about [how -chezmoi compares to other dotfile -managers](https://github.com/twpayne/chezmoi/blob/master/docs/COMPARISON.md) -first and then [install -chezmoi](https://github.com/twpayne/chezmoi/blob/master/docs/INSTALL.md), follow -the [quick-start -guide](https://github.com/twpayne/chezmoi/blob/master/docs/QUICKSTART.md), and -read the [how-to -guide](https://github.com/twpayne/chezmoi/blob/master/docs/HOWTO.md) to quickly -discover chezmoi's functionality. - ---- - -## Version 2 - -chezmoi version 2 brings many new features and fixes a few corner-case bugs. -Very few, if any, changes should be required to your source directory, -templates, or config file. - ---- - -### New features in version 2 - -* The new `chezmoi status` command shows you a concise list of differences, much - like `git status`. -* The `chezmoi apply` command prompts you if a file has been modified by - something other than chezmoi since chezmoi last wrote it, keeping you in full - control of your changes, wherever you make them. -* The `chezmoi init` command will try to guess your dotfile repository if you - give it a short argument. For example, `chezmoi init username` is the - equivalent of `chezmoi init https://github.com/username/dotfiles.git`. -* chezmoi includes a builtin `git` command which it will use if it cannot find - `git` in your `$PATH`. This means that you don't even have to install `git` to - setup your dotfiles on a new machine. -* chezmoi detects when your config file template has changed and prompts you to - re-run `chezmoi init` if needed. -* The new `create_` attribute allows you to create a file with initial content, - but not have it overwritten by `chezmoi apply`. -* The new `modify_` attribute allows you to modify an existing file with a - script, so you can use chezmoi to manage parts, but not all, of a file. -* The new script attributes `before_` and `after_` control when scripts are run - relative to when your files are updated. -* The new `--exclude` option allows you to control what types of target will be - updated. For example `chezmoi apply --exclude=scripts` will cause chezmoi to - apply everything except scripts and `chezmoi init --apply --exclude=encrypted` - will exclude encrypted files. -* The new `--keep-going` option causes chezmoi to keep going as far as possible - rather than stopping at the first error it encounters. -* The new `--no-tty` option stops chezmoi from opening a TTY to read input - (including passwords) and instead reads them from stdin. -* The new `--source-path` option allows you to specify targets by source path, - which you can use in an on-save editor hook to automatically run `chezmoi - apply` when you edit a dotfile in your source state. -* The new `gitHubKeys` template function allows you to populate your - `~/.ssh/authorized_keys` from your public SSH keys on GitHub. -* The `promptBool` function now also recognizes `y`, `yes`, `on`, `n`, `no`, and - `off` as boolean values. -* The `chezmoi archive` command now includes scripts in the generated archive, - and can generate `.zip` files. -* The new `edit.command` and `edit.args` configuration variables give you more - control over the command invoked by `chezmoi edit`. -* The `chezmoi init` command has a new `--one-shot` option which does a shallow - clone of your dotfiles repo, runs `chezmoi apply`, and then removes your - source and configuration directories. It's the fastest way to set up your - dotfiles on a ephemeral machine and then remove all traces of chezmoi. -* Standard template variables are set on a best-effort basis. If errors are - encountered, chezmoi leaves the variable unset rather than terminating with - the error. -* The new `.chezmoi.version` template variable contains the version of chezmoi. - You can compare versions using [version comparison - functions](https://masterminds.github.io/sprig/semver.html). -* The new `.chezmoi.fqdnHostname` template variables contains the - fully-qualified domain name of the machine, if it can be determined. -* You can now encrypt whole files with [age](https://age-encryption.org). - ---- - -### Changes from version 1 - -chezmoi version 2 includes a few minor changes from version 1, mainly to enable -the new functionality and for consistency: - -* chezmoi uses a different format to persist its state. Specifically, this means - that all your `run_once_` scripts will be run again the first time you run - `chezmoi apply`. -* `chezmoi add`, and many other commands, are now recursive by default. -* `chezmoi apply` will warn if a file in the destination directory has been - modified since chezmoi last wrote it. To force overwriting, pass the `--force` - option. -* `chezmoi edit` no longer supports the `--prompt` option. -* The only diff format is now `git`. The `diff.format` configuration variable is - ignored. -* Diffs include the contents of scripts that would be run. -* Mercurial support has been removed. -* The `chezmoi source` command has been removed, use `chezmoi git` instead. -* The `sourceVCS` configuration group has been renamed to `git`. -* The order of files for a three-way merge passed to `merge.command` is now - actual file, target state, source state. -* The `chezmoi keyring` command has been moved to `chezmoi secret keyring`. -* The `genericSecret` configuration group has been renamed to `secret`. -* The `chezmoi chattr` command uses `encrypted` instead of `encrypt` as the - attribute for encrypted files. -* The gpg recipient is configured with the `gpg.recipient` configuration - variable, `gpgRecipient` is no longer used. -* The structure of data output by `chezmoi dump` has changed. -* The `.chezmoi.homedir` template variable has been replaced with - `.chezmoi.homeDir`. For compatibility, `.chezmoi.homedir` will continue to be - supported until version 2.1. -* The `.chezmoi.fullHostname` template variable has been removed, as it did not - contain the full hostname. Use `.chezmoi.fqdnHostname` (UNIX only) instead. - ---- diff --git a/docs/COMPARISON.md b/docs/COMPARISON.md deleted file mode 100644 index 59fbb9d7a20..00000000000 --- a/docs/COMPARISON.md +++ /dev/null @@ -1,181 +0,0 @@ -# chezmoi comparison guide - -<!--- toc ---> -* [Comparison table](#comparison-table) -* [Why should I use a dotfile manager?](#why-should-i-use-a-dotfile-manager) -* [I already have a system to manage my dotfiles, why should I use chezmoi?](#i-already-have-a-system-to-manage-my-dotfiles-why-should-i-use-chezmoi) - * [Coping with differences between machines requires extra effort](#coping-with-differences-between-machines-requires-extra-effort) - * [You have to keep your dotfiles repo private](#you-have-to-keep-your-dotfiles-repo-private) - * [You have to maintain your own tool](#you-have-to-maintain-your-own-tool) - * [Setting up your dotfiles requires more than one short command](#setting-up-your-dotfiles-requires-more-than-one-short-command) - ---- - -## Comparison table - -[chezmoi]: https://chezmoi.io/ -[dotbot]: https://github.com/anishathalye/dotbot -[rcm]: https://github.com/thoughtbot/rcm -[homesick]: https://github.com/technicalpickles/homesick -[vcsh]: https://github.com/RichiH/vcsh -[yadm]: https://yadm.io/ -[bare git]: https://www.atlassian.com/git/tutorials/dotfiles "bare git" - -| | [chezmoi] | [dotbot] | [rcm] | [homesick] | [vcsh] | [yadm] | [bare git] | -| -------------------------------------- | ------------- | ----------------- | ----------------- | ----------------- | ------------------------ | ---------------------------- | ---------- | -| Distribution | Single binary | Python package | Multiple files | Ruby gem | Single script or package | Single script | - | -| Install method | Many | git submodule | Many | Ruby gem | Many | Many | Manual | -| Non-root install on bare system | ✅ | ⁉️ | ⁉️ | ⁉️ | ✅ | ✅ | ✅ | -| Windows support | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | -| Bootstrap requirements | None | Python, git | Perl, git | Ruby, git | sh, git | git | git | -| Source repos | Single | Single | Multiple | Single | Multiple | Single | Single | -| dotfiles are... | Files | Symlinks | Files | Symlinks | Files | Files | Files | -| Config file | Optional | Required | Optional | None | None | Optional | Optional | -| Private files | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | -| Show differences without applying | ✅ | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ | -| Whole file encryption | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | -| Password manager integration | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| Machine-to-machine file differences | Templates | Alternative files | Alternative files | Alternative files | Branches | Alternative files, templates | ⁉️ | -| Custom variables in templates | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| Executable files | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | -| File creation with initial contents | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | -| Externals | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| Manage partial files | ✅ | ❌ | ❌ | ❌ | ⁉️ | ✅ | ⁉️ | -| File removal | ✅ | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ | -| Directory creation | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | -| Run scripts | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ❌ | -| Run once scripts | ✅ | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ | -| Machine-to-machine symlink differences | ✅ | ❌ | ❌ | ❌ | ⁉️ | ✅ | ⁉️ | -| Shell completion | ✅ | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ | -| Archive import | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | ✅ | -| Archive export | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | ✅ | -| Implementation language | Go | Python | Perl | Ruby | POSIX Shell | Bash | C | - -✅ Supported, ⁉️ Possible with significant manual effort, ❌ Not supported - -For more comparisons, visit [dotfiles.github.io](https://dotfiles.github.io/). - ---- - -## Why should I use a dotfile manager? - -Dotfile managers give you the combined benefit of a consistent environment -everywhere with an undo command and a restore from backup. - -As the core of our development environments become increasingly standardized -(e.g. git or Mercurial interfaces to version control at both home and work), and -we further customize them (with shell configs like -[powerlevel10k](https://github.com/romkatv/powerlevel10k)), at the same time we -increasingly work in ephemeral environments like Docker containers and [GitHub -Codespaces](https://github.com/features/codespaces). - -chezmoi helps you bring your personal configuration to every environment that -you're working in. In the same way that nobody would use an editor without an -undo command, or develop software without a version control system, chezmoi -brings the investment that you have made in mastering your tools to every -environment that you work in. - ---- - -## I already have a system to manage my dotfiles, why should I use chezmoi? - -> Regular reminder that chezmoi is the best dotfile manager utility I've used -> and you can too -> -> — [@mbbroberg](https://twitter.com/mbbroberg/status/1355644967625125892) - -If you're using any of the following methods: - -* A custom shell script. -* An existing dotfile manager like - [dotbot](https://github.com/anishathalye/dotbot), - [rcm](https://github.com/thoughtbot/rcm), - [homesick](https://github.com/technicalpickles/homesick), - [vcsh](https://github.com/RichiH/vcsh), - [yadm](https://yadm.io/), or [GNU Stow](https://www.gnu.org/software/stow/). -* A [bare git repo](https://www.atlassian.com/git/tutorials/dotfiles). - -Then you've probably run into at least one of the following problems. - ---- - -### Coping with differences between machines requires extra effort - -If you want to synchronize your dotfiles across multiple operating systems or -distributions, then you may need to manually perform extra steps to cope with -differences from machine to machine. You might need to run different commands on -different machines, maintain separate per-machine files or branches (with the -associated hassle of merging, rebasing, or copying each change), or hope that -your custom logic handles the differences correctly. - -chezmoi uses a single source of truth (a single branch) and a single command -that works on every machine. Individual files can be templates to handle machine -to machine differences, if needed. - ---- - -### You have to keep your dotfiles repo private - -> And regarding dotfiles, I saw that. It's only public dotfiles repos so I have -> to evaluate my dotfiles history to be sure. I have secrets scanning and more, -> but it was easier to keep it private for security, I'm ok mostly though. I'm -> using chezmoi and it's easier now -> -> — [@sheldon_hull](https://twitter.com/sheldon_hull/status/1308139570597371907) - -If your system stores secrets in plain text, then you must be very careful about -where you clone your dotfiles. If you clone them on your work machine then -anyone with access to your work machine (e.g. your IT department) will have -access to your home secrets. If you clone it on your home machine then you risk -leaking work secrets. - -With chezmoi you can store secrets in your password manager or encrypt them, and -even store passwords in different ways on different machines. You can clone your -dotfiles repository anywhere, and even make your dotfiles repo public, without -leaving personal secrets on your work machine or work secrets on your personal -machine. - ---- - -### You have to maintain your own tool - -> I've offloaded my dotfiles deployment from a homespun shell script to chezmoi. -> I'm quite happy with this decision. -> -> — [@gotgenes](https://twitter.com/gotgenes/status/1251008845163319297) - -> I discovered chezmoi and it's pretty cool, just migrated my old custom -> multi-machine sync dotfile setup and it's so much simpler now -> -> in case you're wondering I have written 0 code -> -> — [@buritica](https://twitter.com/buritica/status/1361062902451630089) - -If your system was written by you for your personal use, then it probably has -the functionality that you needed when you wrote it. If you need more -functionality then you have to implement it yourself. - -chezmoi includes a huge range of battle-tested functionality out-of-the-box, -including dry-run and diff modes, script execution, conflict resolution, Windows -support, and much, much more. chezmoi is [used by thousands of -people](https://github.com/twpayne/chezmoi/stargazers) and has a rich suite of -both unit and integration tests. When you hit the limits of your existing -dotfile management system, chezmoi already has a tried-and-tested solution ready -for you to use. - ---- - -### Setting up your dotfiles requires more than one short command - -If your system is written in a scripting language like Python, Perl, or Ruby, -then you also need to install a compatible version of that language's runtime -before you can use your system. - -chezmoi is distributed as a single stand-alone statically-linked binary with no -dependencies that you can simply copy onto your machine and run. You don't even -need git installed. chezmoi provides one-line installs, pre-built binaries, -packages for Linux and BSD distributions, Homebrew formulae, Scoop and -Chocolatey support on Windows, and a initial config file generation mechanism to -make installing your dotfiles on a new machine as painless as possible. - ---- diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md deleted file mode 100644 index b363f1e85b0..00000000000 --- a/docs/CONTRIBUTING.md +++ /dev/null @@ -1,299 +0,0 @@ -# chezmoi contributing guide - -<!--- toc ---> -* [Getting started](#getting-started) -* [Developing locally](#developing-locally) -* [Generated code](#generated-code) -* [Contributing changes](#contributing-changes) -* [Managing releases](#managing-releases) -* [Building and installing with `make`](#building-and-installing-with-make) -* [Packaging](#packaging) -* [Updating the website](#updating-the-website) - ---- - -## Getting started - -chezmoi is written in [Go](https://golang.org) and development happens on -[GitHub](https://github.com). The rest of this document assumes that you've -checked out chezmoi locally. - -The [Architecture Guide](ARCHITECTURE.md) contains a high-level overview of -chezmoi's source code. - ---- - -## Developing locally - -chezmoi requires Go 1.16 or later. - -chezmoi is a standard Go project, using standard Go tooling. - -Build chezmoi: - -```console -$ go build -``` - -Run all tests: - -```console -$ go test ./... -``` - -chezmoi's tests include integration tests with other software. If the other -software is not found in `$PATH` the tests will be skipped. Running the full set -of tests requires `age`, `base64`, `bash`, `gpg`, `perl`, `python`, `ruby`, -`sed`, `sha256sum`, `unzip`, and `zip`. - -Run chezmoi: - -```console -$ go run . -``` - -Run a set of smoketests, including cross-compilation, tests, and linting: - -```console -$ make smoketest -``` - ---- - -## Generated code - -chezmoi generates the install script and the website from a single source of -truth. You must run - -```console -$ go generate -``` - -if you change includes any of the following: - -* Adds or modifies the list of supported OSs and architectures. -* Modifies the install script template. - -chezmoi's continuous integration verifies that all generated files are up to -date. Changes to generated files should be included in the commit that modifies -the source of truth. - ---- - -## Contributing changes - -Bug reports, bug fixes, and documentation improvements are always welcome. -Please [open an issue](https://github.com/twpayne/chezmoi/issues/new/choose) or -[create a pull -request](https://help.github.com/en/articles/creating-a-pull-request) with your -report, fix, or improvement. - -If you want to make a more significant change, please first [open an -issue](https://github.com/twpayne/chezmoi/issues/new/choose) to discuss the -change that you want to make. Dave Cheney gives a [good -rationale](https://dave.cheney.net/2019/02/18/talk-then-code) as to why this is -important. - -All changes are made via pull requests. In your pull request, please make sure -that: - -* All existing tests pass. - -* There are appropriate additional tests that demonstrate that your PR works as - intended. - -* The documentation is updated, if necessary. For new features you should add an - entry in `docs/HOWTO.md` and a complete description in `docs/REFERENCE.md`. - -* All generated files are up to date. You can ensure this by running `make - generate` and including any modified files in your commit. - -* The code is correctly formatted, according to - [`gofumpt`](https://mvdan.cc/gofumpt/). You can ensure this by running `make - format`. - -* The code passes [`golangci-lint`](https://github.com/golangci/golangci-lint). - You can ensure this by running `make lint`. - -* The commit messages follow the [conventional commits - specification](https://www.conventionalcommits.org/en/v1.0.0/). - -* Commits are logically separate, with no merge or "fixup" commits. - -* The branch applies cleanly to `master`. - ---- - -## Managing releases - -Releases are managed with [`goreleaser`](https://goreleaser.com/). - -To build a test release, without publishing, (Linux only) run: - -```console -$ make test-release -``` - -Publish a new release by creating and pushing a tag, e.g.: - -```console -$ git tag v1.2.3 -$ git push --tags -``` - -This triggers a [GitHub Action](https://github.com/twpayne/chezmoi/actions) that -builds and publishes archives, packages, and snaps, and creates a new [GitHub -Release](https://github.com/twpayne/chezmoi/releases). - -Publishing [Snaps](https://snapcraft.io/) requires a `SNAPCRAFT_LOGIN` -[repository -secret](https://github.com/twpayne/chezmoi/settings/secrets/actions). Snapcraft -logins periodically expire. Create a new snapcraft login by running: - -```console -$ snapcraft export-login --snaps=chezmoi --channels=stable,candidate,beta,edge --acls=package_upload - -``` - -[brew](https://brew.sh/) automation will automatically detect new releases of -chezmoi within a few hours and open a pull request in -[https://github.com/Homebrew/homebrew-core](github.com/Homebrew/homebrew-core) -to bump the version. - -If needed, the pull request can be created with: - -```console -$ brew bump-formula-pr --tag=v1.2.3 chezmoi -``` - ---- - -## Building and installing with `make` - -chezmoi can be built with GNU make, assuming you have the Go toolchain -installed. - -Running `make` will build a `chezmoi` binary in the current directory for the -host OS and architecture. To embed version information in the binary and control -installation the following variables are available: - -| Variable | Example | Purpose | -| ----------- | ---------------------- | ---------------------------------------------- | -| `$VERSION` | `v2.0.0` | Set version | -| `$COMMIT` | `3895680a`... | Set the git commit at which the code was built | -| `$DATE` | `2019-11-23T18:29:25Z` | The time of the build | -| `$BUILT_BY` | `homebrew` | The packaging system performing the build | -| `$PREFIX` | `/usr` | Installation prefix | -| `$DESTDIR` | `install-root` | Fake installation root | - -Running `make install` will install the `chezmoi` binary in `${DESTDIR}${PREFIX}/bin`. - ---- - -## Packaging - -If you're packaging chezmoi for an operating system or distribution: - -* chezmoi has no build dependencies other than the standard Go toolchain. - -* chezmoi has no runtime dependencies, but is usually used with `git`, so many - packagers choose to make `git` an install dependency or recommended package. - -* Please set the version number, git commit, and build time in the binary. This - greatly assists debugging when end users report problems or ask for help. You - can do this by passing the following flags to `go build`: - - ``` - -ldflags "-X main.version=$VERSION - -X main.commit=$COMMIT - -X main.date=$DATE - -X main.builtBy=$BUILT_BY" - ``` - - `$VERSION` should be the chezmoi version, e.g. `1.7.3`. Any `v` prefix is - optional and will be stripped, so you can pass the git tag in directly. The - command `git describe --abbrev=0 --tags` will return a suitable value. - - `$COMMIT` should be the full git commit hash at which chezmoi is built, e.g. - `4d678ce6850c9d81c7ab2fe0d8f20c1547688b91`. The command `git rev-parse HEAD` - will return a suitable value. - - `$DATE` should be the date of the build as a UNIX timestamp or in RFC3339 - format. The command `git show -s --format=%ct HEAD` returns the UNIX timestamp - of the last commit, e.g. `1636668628`. The command `date -u - +%Y-%m-%dT%H:%M:%SZ` returns the current time in RFC3339 format, e.g. - `2019-11-23T18:29:25Z`. - - `$BUILT_BY` should be a string indicating what system was used to build the - binary. Typically it should be the name of your packaging system, e.g. - `homebrew`. - -* Please enable cgo, if possible. chezmoi can be built and run without cgo, but - the `.chezmoi.username` and `.chezmoi.group` template variables may not be set - correctly on some systems. - -* chezmoi includes an `upgrade` command which attempts to self-upgrade. You can - remove this command completely by building chezmoi with the `noupgrade` build - tag. - -* chezmoi includes shell completions in the `completions` directory. Please - include these in the package and install them in the shell-appropriate - directory, if possible. - -* If the instructions for installing chezmoi in chezmoi's [install - guide](https://github.com/twpayne/chezmoi/blob/master/docs/INSTALL.md) are - absent or incorrect, please open an issue or submit a PR to correct them. - ---- - -## Updating the website - -[The website](https://chezmoi.io) is generated with [Hugo](https://gohugo.io/) -and served with [GitHub pages](https://pages.github.com/) from the [`gh-pages` -branch](https://github.com/twpayne/chezmoi/tree/gh-pages) to GitHub. - -chezmoi requires the extended version of Hugo which includes Sass/SCSS support. -You can verify your Hugo version by looking for `extended` in the output of -`hugo version`, for example: - -```console -$ hugo version -hugo v0.90.0+extended darwin/arm64 BuildDate=unknown -``` - -Before building the website, you must download the [Hugo Book -Theme](https://github.com/alex-shpak/hugo-book) by running: - -```console -$ git submodule update --init -``` - -Test the website locally by running: - -```console -$ ( cd assets/chezmoi.io && hugo serve ) -``` - -and visit http://localhost:1313/. - -To build the website in a temporary directory, run: - -```console -$ ( cd assets/chezmoi.io && make ) -``` - -From here you can run - -```console -$ git show -``` - -to show changes and - -```console -$ git push -``` - -to push them. You can only push changes if you have write permissions to the -chezmoi GitHub repo. - ---- diff --git a/docs/FAQ.md b/docs/FAQ.md deleted file mode 100644 index 75a99f1e9ea..00000000000 --- a/docs/FAQ.md +++ /dev/null @@ -1,629 +0,0 @@ -# chezmoi frequently asked questions - -<!--- toc ---> -* [How can I quickly check for problems with chezmoi on my machine?](#how-can-i-quickly-check-for-problems-with-chezmoi-on-my-machine) -* [How do I edit my dotfiles with chezmoi?](#how-do-i-edit-my-dotfiles-with-chezmoi) -* [Do I have to use `chezmoi edit` to edit my dotfiles?](#do-i-have-to-use-chezmoi-edit-to-edit-my-dotfiles) -* [Why do I get a blank buffer when running `chezmoi edit`?](#why-do-i-get-a-blank-buffer-when-running-chezmoi-edit) -* [What are the consequences of "bare" modifications to the target files? If my `.zshrc` is managed by chezmoi and I edit `~/.zshrc` without using `chezmoi edit`, what happens?](#what-are-the-consequences-of-bare-modifications-to-the-target-files-if-my-zshrc-is-managed-by-chezmoi-and-i-edit-zshrc-without-using-chezmoi-edit-what-happens) -* [How can I tell what dotfiles in my home directory aren't managed by chezmoi? Is there an easy way to have chezmoi manage a subset of them?](#how-can-i-tell-what-dotfiles-in-my-home-directory-arent-managed-by-chezmoi-is-there-an-easy-way-to-have-chezmoi-manage-a-subset-of-them) -* [How can I tell what dotfiles in my home directory are currently managed by chezmoi?](#how-can-i-tell-what-dotfiles-in-my-home-directory-are-currently-managed-by-chezmoi) -* [If there's a mechanism in place for the above, is there also a way to tell chezmoi to ignore specific files or groups of files (e.g. by directory name or by glob)?](#if-theres-a-mechanism-in-place-for-the-above-is-there-also-a-way-to-tell-chezmoi-to-ignore-specific-files-or-groups-of-files-eg-by-directory-name-or-by-glob) -* [If the target already exists, but is "behind" the source, can chezmoi be configured to preserve the target version before replacing it with one derived from the source?](#if-the-target-already-exists-but-is-behind-the-source-can-chezmoi-be-configured-to-preserve-the-target-version-before-replacing-it-with-one-derived-from-the-source) -* [Once I've made a change to the source directory, how do I commit it?](#once-ive-made-a-change-to-the-source-directory-how-do-i-commit-it) -* [I've made changes to both the destination state and the source state that I want to keep. How can I keep them both?](#ive-made-changes-to-both-the-destination-state-and-the-source-state-that-i-want-to-keep-how-can-i-keep-them-both) -* [Why does chezmoi convert all my template variables to lowercase?](#why-does-chezmoi-convert-all-my-template-variables-to-lowercase) -* [chezmoi makes `~/.ssh/config` group writeable. How do I stop this?](#chezmoi-makes-sshconfig-group-writeable-how-do-i-stop-this) -* [Why does `chezmoi cd` spawn a shell instead of just changing directory?](#why-does-chezmoi-cd-spawn-a-shell-instead-of-just-changing-directory) -* [Why doesn't chezmoi use symlinks like GNU Stow?](#why-doesnt-chezmoi-use-symlinks-like-gnu-stow) -* [What are the limitations of chezmoi's symlink mode?](#what-are-the-limitations-of-chezmois-symlink-mode) -* [Can I change how chezmoi's source state is represented on disk?](#can-i-change-how-chezmois-source-state-is-represented-on-disk) -* [The output of `chezmoi diff` is broken and does not contain color. What could be wrong?](#the-output-of-chezmoi-diff-is-broken-and-does-not-contain-color-what-could-be-wrong) -* [gpg encryption fails. What could be wrong?](#gpg-encryption-fails-what-could-be-wrong) -* [Why does the builtin `age` command not support passphrases, symmetric encryption, or SSH keys?](#why-does-the-builtin-age-command-not-support-passphrases-symmetric-encryption-or-ssh-keys) -* [chezmoi reports `chezmoi: user: lookup userid NNNNN: input/output error`](#chezmoi-reports-chezmoi-user-lookup-userid-nnnnn-inputoutput-error) -* [chezmoi reports `chezmoi: timeout` or `chezmoi: timeout obtaining persistent state lock`](#chezmoi-reports-chezmoi-timeout-or-chezmoi-timeout-obtaining-persistent-state-lock) -* [I'm getting errors trying to build chezmoi from source](#im-getting-errors-trying-to-build-chezmoi-from-source) -* [What inspired chezmoi?](#what-inspired-chezmoi) -* [Why not use Ansible/Chef/Puppet/Salt, or similar to manage my dotfiles instead?](#why-not-use-ansiblechefpuppetsalt-or-similar-to-manage-my-dotfiles-instead) -* [Can I use chezmoi to manage files outside my home directory?](#can-i-use-chezmoi-to-manage-files-outside-my-home-directory) -* [Where does the name "chezmoi" come from?](#where-does-the-name-chezmoi-come-from) -* [What other questions have been asked about chezmoi?](#what-other-questions-have-been-asked-about-chezmoi) -* [Where do I ask a question that isn't answered here?](#where-do-i-ask-a-question-that-isnt-answered-here) -* [I like chezmoi. How do I say thanks?](#i-like-chezmoi-how-do-i-say-thanks) - ---- - -## How can I quickly check for problems with chezmoi on my machine? - -Run: - -```console -$ chezmoi doctor -``` - -Anything `ok` is fine, anything `warning` is only a problem if you want to use -the related feature, and anything `error` indicates a definite problem. - ---- - -## How do I edit my dotfiles with chezmoi? - -There are four popular approaches: - -1. Use `chezmoi edit $FILE`. This will open the source file for `$FILE` in your - editor, including . For extra ease, use `chezmoi edit --apply $FILE` to apply - the changes when you quit your editor. -2. Use `chezmoi cd` and edit the files in the source directory directly. Run - `chezmoi diff` to see what changes would be made, and `chezmoi apply` to make - the changes. -3. If your editor supports opening directories, run `chezmoi edit` with no - arguments to open the source directory. -4. Edit the file in your home directory, and then either re-add it by running - `chezmoi add $FILE` or `chezmoi re-add`. Note that `re-add` doesn't work with - templates. -5. Edit the file in your home directory, and then merge your changes with source - state by running `chezmoi merge $FILE`. - ---- - -## Do I have to use `chezmoi edit` to edit my dotfiles? - -No. `chezmoi edit` is a convenience command that has a couple of useful -features, but you don't have to use it. - -You can also run `chezmoi cd` and then just edit the files in the source state -directly. After saving an edited file you can run `chezmoi diff` to check what -effect the changes would have, and run `chezmoi apply` if you're happy with -them. If there are inconsistencies that you want to keep, then `chezmoi -merge-all` will help you resolve any differences. - -`chezmoi edit` provides the following useful features: -* The arguments to `chezmoi edit` are the files in their target location, so you - don't have to think about source state attributes and your editor's syntax - highlighting will work. -* If the dotfile is encrypted in the source state, then `chezmoi edit` will - decrypt it to a private directory, open that file in your `$EDITOR`, and then - re-encrypt the file when you quit your editor. That makes encryption - transparent. -* With the `--diff` and `--apply` options you can see what would change and - apply those changes without having to run `chezmoi diff` or `chezmoi apply`. - -If you chose to edit files in the source state and you're using VIM then then -[`github.com/alker0/chezmoi.vim`](https://github.com/alker0/chezmoi.vim) gives -you syntax highlighting, however you edit your files. - ---- - -## Why do I get a blank buffer when running `chezmoi edit`? - -What's happening here is that your editor is forking, detaching, and terminating -the original process, which chezmoi cannot distinguish from the editor -terminating normally. - -You have two options: -1. Configure your editor command to remain in the foreground. For `vim`, this - means passing the `-f` flag, e.g. by setting the `edit.flags` configuration - variable to `["-f"]`, or by setting the `EDITOR` environment variable to - include the `-f` flag, e.g. `export EDITOR="mvim -f"`. For VSCode, pass the - `--wait` flag. -2. Set the `edit.hardlink` configuration variable to `false`. - ---- - -## What are the consequences of "bare" modifications to the target files? If my `.zshrc` is managed by chezmoi and I edit `~/.zshrc` without using `chezmoi edit`, what happens? - -Until you run `chezmoi apply` your modified `~/.zshrc` will remain in place. -When you run `chezmoi apply` chezmoi will detect that `~/.zshrc` has changed -since chezmoi last wrote it and prompt you what to do. You can resolve -differences with a merge tool by running `chezmoi merge ~/.zshrc`. - ---- - -## How can I tell what dotfiles in my home directory aren't managed by chezmoi? Is there an easy way to have chezmoi manage a subset of them? - -`chezmoi unmanaged` will list everything not managed by chezmoi. You can add -entire directories with `chezmoi add`. - ---- - -## How can I tell what dotfiles in my home directory are currently managed by chezmoi? - -`chezmoi managed` will list everything managed by chezmoi. - ---- - -## If there's a mechanism in place for the above, is there also a way to tell chezmoi to ignore specific files or groups of files (e.g. by directory name or by glob)? - -By default, chezmoi ignores everything that you haven't explicitly added. If you -have files in your source directory that you don't want added to your -destination directory when you run `chezmoi apply` add their names to a file -called `.chezmoiignore` in the source state. - -Patterns are supported, and you can change what's ignored from machine to -machine. The full usage and syntax is described in the [reference -manual](https://github.com/twpayne/chezmoi/blob/master/docs/REFERENCE.md#chezmoiignore). - ---- - -## If the target already exists, but is "behind" the source, can chezmoi be configured to preserve the target version before replacing it with one derived from the source? - -Yes. Run `chezmoi add` will update the source state with the target. To see -diffs of what would change, without actually changing anything, use `chezmoi -diff`. - ---- - -## Once I've made a change to the source directory, how do I commit it? - -You have several options: - -* `chezmoi cd` opens a shell in the source directory, where you can run your - usual version control commands, like `git add` and `git commit`. -* `chezmoi git` runs `git` in the source - directory and pass extra arguments to the command. If you're passing any - flags, you'll need to use `--` to prevent chezmoi from consuming them, for - example `chezmoi git -- commit -m "Update dotfiles"`. -* You can configure chezmoi to automatically commit and push changes to your - source state, as [described in the how-to - guide](https://github.com/twpayne/chezmoi/blob/master/docs/HOWTO.md#automatically-commit-and-push-changes-to-your-repo). - ---- - -## I've made changes to both the destination state and the source state that I want to keep. How can I keep them both? - -`chezmoi merge` will open a merge tool to resolve differences between the source -state, target state, and destination state. Copy the changes you want to keep in -to the source state. - ---- - -## Why does chezmoi convert all my template variables to lowercase? - -This is due to a feature in -[`github.com/spf13/viper`](https://github.com/spf13/viper), the library that -chezmoi uses to read its configuration file. For more information see [this -GitHub issue](https://github.com/twpayne/chezmoi/issues/463). - ---- - -## chezmoi makes `~/.ssh/config` group writeable. How do I stop this? - -By default, chezmoi uses your system's umask when creating files. On most -systems the default umask is `022` but some systems use `002`, which means -that files and directories are group writeable by default. - -You can override this for chezmoi by setting the `umask` configuration variable -in your configuration file, for example: - -```toml -umask = 0o022 -``` - -Note that this will apply to all files and directories that chezmoi manages and -will ensure that none of them are group writeable. It is not currently possible -to control group write permissions for individual files or directories. Please -[open an issue on -GitHub](https://github.com/twpayne/chezmoi/issues/new?assignees=&labels=enhancement&template=02_feature_request.md&title=) -if you need this. - ---- - -## Why does `chezmoi cd` spawn a shell instead of just changing directory? - -`chezmoi cd` spawns a shell because it is not possible for a program to change -the working directory of its parent process. You can add a shell function instead: - -```bash -chezmoi-cd() { - cd $(chezmoi source-path) -} -``` - -Typing `chezmoi-cd` will then change the directory of your current shell to -chezmoi's source directory. - ---- - -## Why doesn't chezmoi use symlinks like GNU Stow? - -Symlinks are first class citizens in chezmoi: chezmoi supports creating them, -updating them, removing them, and even more advanced features not found -elsewhere like having the same symlink point to different targets on different -machines by using a template. - -With chezmoi, you only use a symlink where you really need a symlink, in -contrast to some other dotfile managers (e.g. GNU Stow) which require the use of -symlinks as a layer of indirection between a dotfile's location (which can be -anywhere in your home directory) and a dotfile's content (which needs to be in a -centralized directory that you manage with version control). chezmoi solves this -problem in a different way. - -Instead of using a symlink to redirect from the dotfile's location to the -centralized directory, chezmoi generates the dotfile as a regular file in its -final location from the contents of the centralized directory. This approach -allows chezmoi to provide features that are not possible when using symlinks, -for example having files that are encrypted, executable, private, or templates. - -There's nothing special about dotfiles managed by chezmoi, whereas dotfiles -managed with GNU Stow are special because they're actually symlinks to somewhere -else. - -The only advantage to using GNU Stow-style symlinks is that changes that you -make to the dotfile's contents in the centralized directory are immediately -visible, whereas chezmoi currently requires you to run `chezmoi apply` or -`chezmoi edit --apply`. chezmoi will likely get an alternative solution to this -too, see [#752](https://github.com/twpayne/chezmoi/issues/752). - -If you really want to use symlinks, then chezmoi provides a [symlink -mode](https://github.com/twpayne/chezmoi/blob/master/docs/REFERENCE.md#symlink-mode) -which uses symlinks where possible. - -You can configure chezmoi to work like GNU Stow and have it create a set of -symlinks back to a central directory, but this currently requires a bit of -manual work (as described in -[#167](https://github.com/twpayne/chezmoi/issues/167)). chezmoi might get some -automation to help (see [#886](https://github.com/twpayne/chezmoi/issues/886) -for example) but it does need some convincing use cases that demonstrate that a -symlink from a dotfile's location to its contents in a central directory is -better than just having the correct dotfile contents. - ---- - -## What are the limitations of chezmoi's symlink mode? - -In symlink mode chezmoi replaces targets with symlinks to the source directory -if the the target is a regular file and is not encrypted, executable, private, -or a template. - -Symlinks cannot be used for encrypted files because the source state contains -the ciphertext, not the plaintext. - -Symlinks cannot be used for executable files as the executable bit would need to -be set on the file in the source directory and chezmoi uses only regular files -and directories in its source state for portability across operating systems. -This may change in the future. - -Symlinks cannot be used for private files because git does not persist group and -world permission bits. - -Symlinks cannot be used for templated files because the source state contains -the template, not the result of executing the template. - -Symlinks cannot be used for entire directories because of chezmoi's use of -attributes in the filename mangles entries in the directory, directories might -have the `exact_` attribute and contain empty files, and the directory's entries -might not be usable with symlinks. - -In symlink mode, running `chezmoi add` does not immediately replace the targets -with a symlink. You must run `chezmoi apply` to create the symlinks. - ---- - -## Can I change how chezmoi's source state is represented on disk? - -There are a number of criticisms of how chezmoi's source state is represented on -disk: - -1. Not all possible file permissions can be represented. -2. The long source file names are weird and verbose. -3. Everything is in a single directory, which can end up containing many entries. - -chezmoi's source state representation is a deliberate, practical compromise. - -The `dot_` attribute makes it transparent which dotfiles are managed by chezmoi -and which files are ignored by chezmoi. chezmoi ignores all files and -directories that start with `.` so no special whitelists are needed for version -control systems and their control files (e.g. `.git` and `.gitignore`). - -chezmoi needs per-file metadata to know how to interpret the source file's -contents, for example to know when the source file is a template or if the -file's contents are encrypted. By storing this metadata in the filename, the -metadata is unambiguously associated with a single file and adding, updating, or -removing a single file touches only a single file in the source state. Changes -to the metadata (e.g. `chezmoi chattr +template *target*`) are simple file -renames and isolated to the affected file. - -If chezmoi were to, say, use a common configuration file listing which files -were templates and/or encrypted, then changes to any file would require updates -to the common configuration file. Automating updates to configuration files -requires a round trip (read config file, update config, write config) and it is -not always possible preserve comments and formatting. - -chezmoi's attributes of `executable_`, `private_`, and `readonly_` allow a the -file permissions `0o644`, `0o755`, `0o600`, `0o700`, `0o444`, `0o555`, `0o400`, -and `0o500` to be represented. Directories can only have permissions `0o755`, -`0o700`, or `0o500`. In practice, these cover all permissions typically used for -dotfiles. If this does cause a genuine problem for you, please [open an issue on -GitHub](https://github.com/twpayne/chezmoi/issues/new/choose). - -File permissions and modes like `executable_`, `private_`, `readonly_`, and -`symlink_` could also be stored in the filesystem, rather than in the filename. -However, this requires the permissions to be preserved and handled by the -underlying version control system and filesystem. chezmoi provides first-class -support for Windows, where the `executable_` and `private_` attributes have no -direct equivalents and symbolic links are not always permitted. By using regular -files and directories, chezmoi avoids variations in the operating system, -version control system, and filesystem making it both more robust and more -portable. - -chezmoi uses a 1:1 mapping between entries in the source state and entries in -the target state. This mapping is bi-directional and unambiguous. - -However, this also means that dotfiles that in the same directory in the target -state must be in the same directory in the source state. In particular, every -entry managed by chezmoi in the root of your home directory has a corresponding -entry in the root of your source directory, which can mean that you end up with -a lot of entries in the root of your source directory. - -If chezmoi were to permit, say, multiple separate source directories (so you -could, say, put `dot_bashrc` in a `bash/` subdirectory, and `dot_vimrc` in a -`vim/` subdirectory, but have `chezmoi apply` map these to `~/.bashrc` and -`~/.vimrc` in the root of your home directory) then the mapping between source -and target states is no longer bidirectional nor unambiguous, which -significantly increases complexity and requires more user interaction. For -example, if both `bash/dot_bashrc` and `vim/dot_bashrc` exist, what should be -the contents of `~/.bashrc`? If you run `chezmoi add ~/.zshrc`, should -`dot_zshrc` be stored in the source `bash/` directory, the source `vim/` -directory, or somewhere else? How does the user communicate their preferences? - -chezmoi has many users and any changes to the source state representation must -be backwards-compatible. - -In summary, chezmoi's source state representation is a compromise with both -advantages and disadvantages. Changes to the representation will be considered, -but must meet the following criteria, in order of importance: - -1. Be fully backwards-compatible for existing users. -2. Fix a genuine problem encountered in practice. -3. Be independent of the underlying operating system, version control system, - and filesystem. -4. Not add significant extra complexity to the user interface or underlying - implementation. - ---- - -## The output of `chezmoi diff` is broken and does not contain color. What could be wrong? - -By default, chezmoi's diff output includes ANSI color escape sequences (e.g. -`ESC[37m`) and is piped into your pager (by default `less`). chezmoi assumes -that your pager passes through the ANSI color escape sequences, as configured on -many systems, but not all. If your pager does not pass through ANSI color escape -sequences then you will see monochrome diff output with uninterpreted ANSI color -escape sequences. - -This can typically by fixed by setting the environment variable - -```console -$ export LESS=-R -``` - -which instructs `less` to display "raw" control characters via the `-R` / -`--RAW-CONTROL-CHARS` option. - -You can also set the `pager` configuration variable in your config file, for -example: - -```toml -pager = "less -R" -``` - -If you have set a different pager (via the `pager` configuration variable or -`PAGER` environment variable) then you must ensure that it passes through raw -control characters. Alternatively, you can use the `--color=false` option to -chezmoi to disable colors or the `--no-pager` option to chezmoi to disable the -pager. - ---- - -## gpg encryption fails. What could be wrong? - -The `gpg.recipient` key should be ultimately trusted, otherwise encryption will -fail because gpg will prompt for input, which chezmoi does not handle. You can -check the trust level by running: - -```console -$ gpg --export-ownertrust -``` - -The trust level for the recipient's key should be `6`. If it is not, you can -change the trust level by running: - -```console -$ gpg --edit-key $recipient -``` - -Enter `trust` at the prompt and chose `5 = I trust ultimately`. - ---- - -## Why does the builtin `age` command not support passphrases, symmetric encryption, or SSH keys? - -Passphrases are not supported because chezmoi needs to decrypt files regularly, -e.g. when running a `chezmoi diff` or a `chezmoi status` command, not just when -running `chezmoi apply`. Prompting for a passphrase each time would quickly -become tiresome. - -Symmetric encryption may be supported in the future. Please [open an -issue](https://github.com/twpayne/chezmoi/issues/new?assignees=&labels=enhancement&template=02_feature_request.md&title=) -if you want this. - -SSH keys are not supported as the author of age [explicitly recommends not using -them](https://pkg.go.dev/filippo.io/age#hdr-Key_management): - -> When integrating age into a new system, it's recommended that you only support -> X25519 keys, and not SSH keys. The latter are supported for manual encryption -> operations. - ---- - -## chezmoi reports `chezmoi: user: lookup userid NNNNN: input/output error` - -This is likely because the chezmoi binary you are using was statically compiled -with [musl](https://musl.libc.org/) and the machine you are running on uses -LDAP or NIS. - -The immediate fix is to use a package built for your distribution (e.g a `.deb` -or `.rpm`) which is linked against glibc and includes LDAP/NIS support instead -of the statically-compiled binary. - -If the problem still persists, then please [open an issue on -GitHub](https://github.com/twpayne/chezmoi/issues/new/choose). - ---- - -## chezmoi reports `chezmoi: timeout` or `chezmoi: timeout obtaining persistent state lock` - -chezmoi will report this when it is unable to lock its persistent state -(`~/.config/chezmoi/chezmoistate.boltdb`), typically because another instance of -chezmoi is currently running and holding the lock. - -This can happen, for example, if you have a `run_` script that invokes -`chezmoi`, or are running chezmoi in another window. - -Under the hood, chezmoi uses [bbolt](https://github.com/etcd-io/bbolt) which -permits multiple simultaneous readers, but only one writer (with no readers). - -Commands that take a write lock include `add`, `apply`, `edit`, `forget`, -`import`, `init`, `state`, `unmanage`, and `update`. Commands that take a read -lock include `diff`, `status`, and `verify`. - ---- - -## I'm getting errors trying to build chezmoi from source - -chezmoi requires Go version 1.16 or later. You can check the version of Go with: - -```console -$ go version -``` - -If you try to build chezmoi with an earlier version of Go you will get the error: - -``` -package github.com/twpayne/chezmoi/v2: build constraints exclude all Go files in /home/twp/src/github.com/twpayne/chezmoi -``` - -This is because chezmoi includes the build tag `go1.16` in `main.go`, which is -only set on Go 1.16 or later. - -For more details on building chezmoi, see the [Contributing -Guide]([CONTRIBUTING.md](https://github.com/twpayne/chezmoi/blob/master/docs/CONTRIBUTING.md)). - ---- - -## What inspired chezmoi? - -chezmoi was inspired by [Puppet](https://puppet.com/), but was created because -Puppet is an overkill for managing your personal configuration files. The focus -of chezmoi will always be personal home directory management. If your needs grow -beyond that, switch to a whole system configuration management tool. - ---- - -## Why not use Ansible/Chef/Puppet/Salt, or similar to manage my dotfiles instead? - -Whole system management tools are more than capable of managing your dotfiles, -but are large systems that entail several disadvantages. Compared to whole -system management tools, chezmoi offers: - -* Small, focused feature set designed for dotfiles. There's simply less to learn - with chezmoi compared to whole system management tools. -* Easy installation and execution on every platform, without root access. - Installing chezmoi requires only copying a single binary file with no external - dependencies. Executing chezmoi just involves running the binary. In contrast, - installing and running a whole system management tool typically requires - installing a scripting language runtime, several packages, and running a - system service, all typically requiring root access. - -chezmoi's focus and simple installation means that it runs almost everywhere: -from tiny ARM-based Linux systems to Windows desktops, from inside lightweight -containers to FreeBSD-based virtual machines in the cloud. - ---- - -## Can I use chezmoi to manage files outside my home directory? - -In practice, yes, you can, but this is strongly discouraged beyond using your -system's package manager to install the packages you need. - -chezmoi is designed to operate on your home directory, and is explicitly not a -full system configuration management tool. That said, there are some ways to -have chezmoi manage a few files outside your home directory. - -chezmoi's scripts can execute arbitrary commands, so you can use a `run_` script -that is run every time you run `chezmoi apply`, to, for example: - -* Make the target file outside your home directory a symlink to a file managed - by chezmoi in your home directory. -* Copy a file managed by chezmoi inside your home directory to the target file. -* Execute a template with `chezmoi execute-template --output=filename template` - where `filename` is outside the target directory. - -chezmoi executes all scripts as the user executing chezmoi, so you may need to -add extra privilege elevation commands like `sudo` or `PowerShell start -verb -runas -wait` to your script. - -chezmoi, by default, operates on your home directory but this can be overridden -with the `--destination` command line flag or by specifying `destDir` in your -config file, and could even be the root directory (`/` or `C:\`). This allows -you, in theory, to use chezmoi to manage any file in your filesystem, but this -usage is extremely strongly discouraged. - -If your needs extend beyond modifying a handful of files outside your target -system, then existing configuration management tools like -[Puppet](https://puppet.com/), [Chef](https://chef.io/), -[Ansible](https://www.ansible.com/), and [Salt](https://www.saltstack.com/) are -much better suited - and of course can be called from a chezmoi `run_` script. -Put your Puppet Manifests, Chef Recipes, Ansible Modules, and Salt Modules in a -directory ignored by `.chezmoiignore` so they do not pollute your home -directory. - ---- - -## Where does the name "chezmoi" come from? - -"chezmoi" splits to "chez moi" and pronounced /ʃeɪ mwa/ (shay-moi) meaning "at -my house" in French. It's seven letters long, which is an appropriate length for -a command that is only run occasionally. If you prefer a shorter command, add an -alias to your shell configuration, for example: - -```sh -alias cz=chezmoi -``` - ---- - -## What other questions have been asked about chezmoi? - -See the [issues on -GitHub](https://github.com/twpayne/chezmoi/issues?utf8=%E2%9C%93&q=is%3Aissue+sort%3Aupdated-desc+label%3Asupport). - ---- - -## Where do I ask a question that isn't answered here? - -Please [open an issue on GitHub](https://github.com/twpayne/chezmoi/issues/new/choose). - ---- - -## I like chezmoi. How do I say thanks? - -Thank you! chezmoi was written to scratch a personal itch, and I'm very happy -that it's useful to you. Please give [chezmoi a star on -GitHub](https://github.com/twpayne/chezmoi/stargazers), and if you're happy to -share your public dotfile repo then [tag it with -`chezmoi`](https://github.com/topics/chezmoi?o=desc&s=updated). - -If you write an article or give a talk on chezmoi please inform the author (e.g. -by [opening an issue](https://github.com/twpayne/chezmoi/issues/new/choose)) so -it can be added to chezmoi's [media -page](https://github.com/twpayne/chezmoi/blob/master/docs/MEDIA.md). - -[Contributions are very -welcome](https://github.com/twpayne/chezmoi/blob/master/docs/CONTRIBUTING.md) -and every [bug report, support request, and feature -request](https://github.com/twpayne/chezmoi/issues/new/choose) helps make -chezmoi better. Thank you :) - ---- diff --git a/docs/HOWTO.md b/docs/HOWTO.md deleted file mode 100644 index bdddaf83030..00000000000 --- a/docs/HOWTO.md +++ /dev/null @@ -1,1788 +0,0 @@ -# chezmoi how-to guide - -<!--- toc ---> -* [Perform daily operations](#perform-daily-operations) - * [Use a hosted repo to manage your dotfiles across multiple machines](#use-a-hosted-repo-to-manage-your-dotfiles-across-multiple-machines) - * [Use a private repo to store your dotfiles](#use-a-private-repo-to-store-your-dotfiles) - * [Pull the latest changes from your repo and apply them](#pull-the-latest-changes-from-your-repo-and-apply-them) - * [Pull the latest changes from your repo and see what would change, without actually applying the changes](#pull-the-latest-changes-from-your-repo-and-see-what-would-change-without-actually-applying-the-changes) - * [Automatically commit and push changes to your repo](#automatically-commit-and-push-changes-to-your-repo) - * [Install chezmoi and your dotfiles on a new machine with a single command](#install-chezmoi-and-your-dotfiles-on-a-new-machine-with-a-single-command) -* [Manage different types of file](#manage-different-types-of-file) - * [Have chezmoi create a directory, but ignore its contents](#have-chezmoi-create-a-directory-but-ignore-its-contents) - * [Ensure that a target is removed](#ensure-that-a-target-is-removed) - * [Manage part, but not all, of a file](#manage-part-but-not-all-of-a-file) - * [Manage a file's permissions, but not its contents](#manage-a-files-permissions-but-not-its-contents) - * [Populate `~/.ssh/authorized_keys` with your public SSH keys from GitHub](#populate-sshauthorized_keys-with-your-public-ssh-keys-from-github) -* [Integrate chezmoi with your editor](#integrate-chezmoi-with-your-editor) - * [Use your preferred editor with `chezmoi edit` and `chezmoi edit-config`](#use-your-preferred-editor-with-chezmoi-edit-and-chezmoi-edit-config) - * [Configure VIM to run `chezmoi apply` whenever you save a dotfile](#configure-vim-to-run-chezmoi-apply-whenever-you-save-a-dotfile) -* [Include dotfiles from elsewhere](#include-dotfiles-from-elsewhere) - * [Include a subdirectory from another repository, like Oh My Zsh](#include-a-subdirectory-from-another-repository-like-oh-my-zsh) - * [Include a single file from another repository](#include-a-single-file-from-another-repository) - * [Handle configuration files which are externally modified](#handle-configuration-files-which-are-externally-modified) - * [Import archives](#import-archives) -* [Manage machine-to-machine differences](#manage-machine-to-machine-differences) - * [Use templates](#use-templates) - * [Ignore files or a directory on different machines](#ignore-files-or-a-directory-on-different-machines) - * [Use completely different dotfiles on different machines](#use-completely-different-dotfiles-on-different-machines) - * [Create a config file on a new machine automatically](#create-a-config-file-on-a-new-machine-automatically) - * [Re-create your config file](#re-create-your-config-file) - * [Handle different file locations on different systems with the same contents](#handle-different-file-locations-on-different-systems-with-the-same-contents) - * [Create an archive of your dotfiles](#create-an-archive-of-your-dotfiles) -* [Keep data private](#keep-data-private) - * [Use 1Password](#use-1password) - * [Use Bitwarden](#use-bitwarden) - * [Use gopass](#use-gopass) - * [Use KeePassXC](#use-keepassxc) - * [Use Keychain or Windows Credentials Manager](#use-keychain-or-windows-credentials-manager) - * [Use LastPass](#use-lastpass) - * [Use pass](#use-pass) - * [Use Vault](#use-vault) - * [Use a custom password manager](#use-a-custom-password-manager) - * [Encrypt whole files with gpg](#encrypt-whole-files-with-gpg) - * [Encrypt whole files with age](#encrypt-whole-files-with-age) - * [Use a private configuration file and template variables](#use-a-private-configuration-file-and-template-variables) -* [Use scripts to perform actions](#use-scripts-to-perform-actions) - * [Understand how scripts work](#understand-how-scripts-work) - * [Install packages with scripts](#install-packages-with-scripts) - * [Run a script when the contents of another file changes](#run-a-script-when-the-contents-of-another-file-changes) - * [Clear the state of `run_once_` scripts](#clear-the-state-of-run_once_-scripts) -* [Use chezmoi on macOS](#use-chezmoi-on-macos) - * [Use `brew bundle` to manage your brews and casks](#use-brew-bundle-to-manage-your-brews-and-casks) -* [Use chezmoi on Windows](#use-chezmoi-on-windows) - * [Detect Windows Subsystem for Linux (WSL)](#detect-windows-subsystem-for-linux-wsl) - * [Run a PowerShell script as admin on Windows](#run-a-powershell-script-as-admin-on-windows) -* [Use chezmoi with GitHub Codespaces, Visual Studio Codespaces, or Visual Studio Code Remote - Containers](#use-chezmoi-with-github-codespaces-visual-studio-codespaces-or-visual-studio-code-remote---containers) -* [Customize chezmoi](#customize-chezmoi) - * [Use a subdirectory of your dotfiles repo as the root of the source state](#use-a-subdirectory-of-your-dotfiles-repo-as-the-root-of-the-source-state) - * [Don't show scripts in the diff output](#dont-show-scripts-in-the-diff-output) - * [Customize the diff pager](#customize-the-diff-pager) - * [Use a custom diff tool](#use-a-custom-diff-tool) - * [Use a custom merge tool](#use-a-custom-merge-tool) - * [Use an HTTP or SOCKS5 proxy](#use-an-http-or-socks5-proxy) -* [Migrating to chezmoi from another dotfile manager](#migrating-to-chezmoi-from-another-dotfile-manager) - * [Migrate from a dotfile manager that uses symlinks](#migrate-from-a-dotfile-manager-that-uses-symlinks) -* [Migrate away from chezmoi](#migrate-away-from-chezmoi) - ---- - -## Perform daily operations - ---- - -### Use a hosted repo to manage your dotfiles across multiple machines - -chezmoi relies on your version control system and hosted repo to share changes -across multiple machines. You should create a repo on the source code repository -of your choice (e.g. [Bitbucket](https://bitbucket.org), -[GitHub](https://github.com/), or [GitLab](https://gitlab.com), many people call -their repo `dotfiles`) and push the repo in the source directory here. For -example: - -```console -$ chezmoi cd -$ git remote add origin https://github.com/username/dotfiles.git -$ git push -u origin main -$ exit -``` - -On another machine you can checkout this repo: - -```console -$ chezmoi init https://github.com/username/dotfiles.git -``` - -You can then see what would be changed: - -```console -$ chezmoi diff -``` - -If you're happy with the changes then apply them: - -```console -$ chezmoi apply -``` - -The above commands can be combined into a single init, checkout, and apply: - -```console -$ chezmoi init --apply --verbose https://github.com/username/dotfiles.git -``` - ---- - -### Use a private repo to store your dotfiles - -chezmoi supports storing your dotfiles in both public and private repos. - -chezmoi is designed so that your dotfiles repo can be public by making it easy -for you to store your secrets either in your password manager, in encrypted -files, or in private configuration files. Your dotfiles repo can still be -private, if you choose. - -If you use a private repo for your dotfiles then you will typically need to -enter your credentials (e.g. your username and password) each time you interact -with the repo, for example when pulling or pushing changes. chezmoi itself does -not store any credentials, but instead relies on your local git configuration -for these operations. - -When using a private repo on GitHub without `--ssh`, when prompted for a -password you will need to enter a [GitHub personal access -token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token). -For more information on these changes, read the [GitHub blog post on Token -authentication requirements for Git -operations](https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/) - ---- - -### Pull the latest changes from your repo and apply them - -You can pull the changes from your repo and apply them in a single command: - -```console -$ chezmoi update -``` - -This runs `git pull --rebase` in your source directory and then `chezmoi apply`. - ---- - -### Pull the latest changes from your repo and see what would change, without actually applying the changes - -Run: - -```console -$ chezmoi git pull -- --rebase && chezmoi diff -``` - -This runs `git pull --rebase` in your source directory and `chezmoi -diff` then shows the difference between the target state computed from your -source directory and the actual state. - -If you're happy with the changes, then you can run - -```console -$ chezmoi apply -``` - -to apply them. - ---- - -### Automatically commit and push changes to your repo - -chezmoi can automatically commit and push changes to your source directory to -your repo. This feature is disabled by default. To enable it, add the following -to your config file: - -```toml -[git] - autoCommit = true - autoPush = true -``` - -Whenever a change is made to your source directory, chezmoi will commit the -changes with an automatically-generated commit message (if `autoCommit` is true) -and push them to your repo (if `autoPush` is true). `autoPush` implies -`autoCommit`, i.e. if `autoPush` is true then chezmoi will auto-commit your -changes. If you only set `autoCommit` to true then changes will be committed but -not pushed. - -Be careful when using `autoPush`. If your dotfiles repo is public and you -accidentally add a secret in plain text, that secret will be pushed to your -public repo. - ---- - -### Install chezmoi and your dotfiles on a new machine with a single command - -chezmoi's install script can run `chezmoi init` for you by passing extra -arguments to the newly installed chezmoi binary. If your dotfiles repo is -`github.com/<github-username>/dotfiles` then installing chezmoi, running -`chezmoi init`, and running `chezmoi apply` can be done in a single line of -shell: - -```console -$ sh -c "$(curl -fsLS chezmoi.io/get)" -- init --apply <github-username> -``` - -If your dotfiles repo has a different name to `dotfiles`, or if you host your -dotfiles on a different service, then see the [reference manual for `chezmoi -init`](https://github.com/twpayne/chezmoi/blob/master/docs/REFERENCE.md#init-repo). - -For setting up transitory environments (e.g. short-lived Linux containers) you -can install chezmoi, install your dotfiles, and then remove all traces of -chezmoi, including the source directory and chezmoi's configuration directory, -with a single command: - -```console -$ sh -c "$(curl -fsLS chezmoi.io/get)" -- init --one-shot <github-username> -``` - ---- - -## Manage different types of file - ---- - -### Have chezmoi create a directory, but ignore its contents - -If you want chezmoi to create a directory, but ignore its contents, say `~/src`, -first run: - -```console -$ mkdir -p $(chezmoi source-path)/src -``` - -This creates the directory in the source state, which means that chezmoi will -create it (if it does not already exist) when you run `chezmoi apply`. - -However, as this is an empty directory it will be ignored by git. So, create a -file in the directory in the source state that will be seen by git (so git does -not ignore the directory) but ignored by chezmoi (so chezmoi does not include it -in the target state): - -```console -$ touch $(chezmoi source-path)/src/.keep -``` - -chezmoi automatically creates `.keep` files when you add an empty directory with -`chezmoi add`. - ---- - -### Ensure that a target is removed - -Create a file called `.chezmoiremove` in the source directory containing a list -of patterns of files to remove. chezmoi will remove anything in the target -directory that matches the pattern. As this command is potentially dangerous, -you should run chezmoi in verbose, dry-run mode beforehand to see what would be -removed: - -```console -$ chezmoi apply --dry-run --verbose -``` - -`.chezmoiremove` is interpreted as a template, so you can remove different files -on different machines. Negative matches (patterns prefixed with a `!`) or -targets listed in `.chezmoiignore` will never be removed. - ---- - -### Manage part, but not all, of a file - -chezmoi, by default, manages whole files, but there are two ways to manage just -parts of a file. - -Firstly, a `modify_` script receives the current contents of the file on the -standard input and chezmoi reads the target contents of the file from the -script's standard output. This can be used to change parts of a file, for -example using `sed`. Note that if the file does not exist then the standard -input to the `modify_` script will be empty and it is the script's -responsibility to write a complete file to the standard output. - -Secondly, if only a small part of the file changes then consider using a -template to re-generate the full contents of the file from the current state. -For example, Kubernetes configurations include a current context that can be -substituted with: - -``` -current-context: {{ output "kubectl" "config" "current-context" | trim }} -``` - ---- - -### Manage a file's permissions, but not its contents - -chezmoi's `create_` attributes allows you to tell chezmoi to create a file if it -does not already exist. chezmoi, however, will apply any permission changes from -the `executable_`, `private_`, and `readonly_` attributes. This can be used to -control a file's permissions without altering its contents. - -For example, if you want to ensure that `~/.kube/config` always has permissions -600 then if you create an empty file called `dot_kube/private_dot_config` in -your source state, chezmoi will ensure `~/.kube/config`'s permissions are 0600 -when you run `chezmoi apply` without changing its contents. - -This approach does have the downside that chezmoi will create the file if it -does not already exist. If you only want `chezmoi apply` to set a file's -permissions if it already exists and not create the file otherwise, you can use -a `run_` script. For example, create a file in your source state called -`run_set_kube_config_permissions.sh` containing: - -```bash -#!/bin/sh - -FILE="$HOME/.kube/config" -if [ -f "$FILE" ]; then - if [ "$(stat -c %a "$FILE")" != "600" ] ; then - chmod 600 "$FILE" - fi -fi -``` - ---- - -### Populate `~/.ssh/authorized_keys` with your public SSH keys from GitHub - -chezmoi can retrieve your public SSH keys from GitHub, which can be useful for -populating your `~/.ssh/authorized_keys`. Put the following in your -`~/.local/share/chezmoi/dot_ssh/authorized_keys.tmpl`, where `username` is your -GitHub username: - -``` -{{ range (gitHubKeys "username") -}} -{{ .Key }} -{{ end -}} -``` - ---- - -## Integrate chezmoi with your editor - ---- - -### Use your preferred editor with `chezmoi edit` and `chezmoi edit-config` - -By default, chezmoi will use your preferred editor as defined by the `$VISUAL` -or `$EDITOR` environment variables, falling back to a default editor depending -on your operating system (`vi` on UNIX-like operating systems, `notepad.exe` on -Windows). - -You can configure chezmoi to use your preferred editor by either setting the -`$EDITOR` environment variable or setting the `edit.command` variable in your -configuration file. - -The editor command must only return when you have finished editing the files. -chezmoi will emit a warning if your editor command returns too quickly. - -In the specific case of using [VSCode](https://code.visualstudio.com/) or -[Codium](https://vscodium.com/) as your editor, you must pass the `--wait` flag, -for example, in your shell config: - -```console -$ export EDITOR="code --wait" -``` - -Or in chezmoi's configuration file: - -```toml -[edit] - command = "code" - args = ["--wait"] -``` - ---- - -### Configure VIM to run `chezmoi apply` whenever you save a dotfile - -Put the following in your `.vimrc`: - -```vim -autocmd BufWritePost ~/.local/share/chezmoi/* ! chezmoi apply --source-path "%" -``` - ---- - -## Include dotfiles from elsewhere - ---- - -### Include a subdirectory from another repository, like Oh My Zsh - -To include a subdirectory from another repository, e.g. [Oh My -Zsh](https://github.com/ohmyzsh/ohmyzsh), you cannot use git submodules because -chezmoi uses its own format for the source state and Oh My Zsh is not -distributed in this format. Instead, you can use the `.chezmoiexternal.<format>` -to tell chezmoi to import dotfiles from an external source. - -For example, to import Oh My Zsh, the [zsh-syntax-highlighting -plugin](https://github.com/zsh-users/zsh-syntax-highlighting), and -[powerlevel10k](https://github.com/romkatv/powerlevel10k), put the following in -`~/.local/share/chezmoi/.chezmoiexternal.toml`: - -```toml -[".oh-my-zsh"] - type = "archive" - url = "https://github.com/ohmyzsh/ohmyzsh/archive/master.tar.gz" - exact = true - stripComponents = 1 - refreshPeriod = "168h" -[".oh-my-zsh/custom/plugins/zsh-syntax-highlighting"] - type = "archive" - url = "https://github.com/zsh-users/zsh-syntax-highlighting/archive/master.tar.gz" - exact = true - stripComponents = 1 - refreshPeriod = "168h" -[".oh-my-zsh/custom/themes/powerlevel10k"] - type = "archive" - url = "https://github.com/romkatv/powerlevel10k/archive/v1.15.0.tar.gz" - exact = true - stripComponents = 1 -``` - -To apply the changes, run: - -```console -$ chezmoi apply -``` - -chezmoi will download the archives and unpack them as if they were part of the -source state. chezmoi caches downloaded archives locally to avoid re-downloading -them every time you run a chezmoi command, and will only re-download them at -most every `refreshPeriod` (default never). - -In the above example `refreshPeriod` is set to `168h` (one week) for -`.oh-my-zsh` and `.oh-my-zsh/custom/plugins/zsh-syntax-highlighting` because the -URL point to tarballs of the `master` branch, which changes over time. No -refresh period is set for `.oh-my-zsh/custom/themes/powerlevel10k` because the -URL points to the a tarball of a tagged version, which does not change over -time. To bump the version of powerlevel10k, change the version in the URL. - -To force a refresh the downloaded archives, use the `--refresh-externals` flag -to `chezmoi apply`: - -```console -$ chezmoi --refresh-externals apply -``` - -`--refresh-externals` can be shortened to `-R`: - -```console -$ chezmoi -R apply -``` - -When using Oh My Zsh, make sure you disable auto-updates by setting -`DISABLE_AUTO_UPDATE="true"` in `~/.zshrc`. Auto updates will cause the -`~/.oh-my-zsh` directory to drift out of sync with chezmoi's source state. To -update Oh My Zsh and its plugins, refresh the downloaded archives. - ---- - -### Include a single file from another repository - -Including single files uses the same mechanism as including a subdirectory -above, except with the external type `file` instead of `archive`. For example, -to include -[`plug.vim`](https://github.com/junegunn/vim-plug/blob/master/plug.vim) from -[`github.com/junegunn/vim-plug`](https://github.com/junegunn/vim-plug) in -`~/.vim/autoload/plug.vim` put the following in -`~/.local/share/chezmoi/.chezmoiexternal.toml`: - -```toml -[".vim/autoload/plug.vim"] - type = "file" - url = "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" - refreshPeriod = "168h" -``` - ---- - -### Handle configuration files which are externally modified - -Some programs modify their configuration files. When you next run `chezmoi -apply`, any modifications made by the program will be lost. - -You can track changes to these files by replacing with a symlink back to a file -in your source directory, which is under version control. Here is a worked -example for VSCode's `settings.json` on Linux: - -Copy the configuration file to your source directory: - -```console -$ cp ~/.config/Code/User/settings.json $(chezmoi source-path) -``` - -Tell chezmoi to ignore this file: - -```console -$ echo settings.json >> $(chezmoi source-path)/.chezmoiignore -``` - -Tell chezmoi that `~/.config/Code/User/settings.json` should be a symlink to the -file in your source directory: - -```console -$ mkdir -p $(chezmoi source-path)/private_dot_config/private_Code/User -$ echo -n "{{ .chezmoi.sourceDir }}/settings.json" > $(chezmoi source-path)/private_dot_config/private_Code/User/symlink_settings.json.tmpl -``` - -The prefix `private_` is used because the `~/.config` and `~/.config/Code` -directories are private by default. - -Apply the changes: - -```console -$ chezmoi apply -v -``` - -Now, when the program modifies its configuration file it will modify the file in -the source state instead. - ---- - -### Import archives - -It is occasionally useful to import entire archives of configuration into your -source state. The `import` command does this. For example, to import the latest -version [`github.com/ohmyzsh/ohmyzsh`](https://github.com/ohmyzsh/ohmyzsh) to -`~/.oh-my-zsh` run: - -```console -$ curl -s -L -o ${TMPDIR}/oh-my-zsh-master.tar.gz https://github.com/ohmyzsh/ohmyzsh/archive/master.tar.gz -$ mkdir -p $(chezmoi source-path)/dot_oh-my-zsh -$ chezmoi import --strip-components 1 --destination ~/.oh-my-zsh ${TMPDIR}/oh-my-zsh-master.tar.gz -``` - -Note that this only updates the source state. You will need to run - -```console -$ chezmoi apply -``` - -to update your destination directory. - ---- - -## Manage machine-to-machine differences - ---- - -### Use templates - -The primary goal of chezmoi is to manage configuration files across multiple -machines, for example your personal macOS laptop, your work Ubuntu desktop, and -your work Linux laptop. You will want to keep much configuration the same across -these, but also need machine-specific configurations for email addresses, -credentials, etc. chezmoi achieves this functionality by using -[`text/template`](https://pkg.go.dev/text/template) for the source state where -needed. - -For example, your home `~/.gitconfig` on your personal machine might look like: - -```toml -[user] - email = "[email protected]" -``` - -Whereas at work it might be: - -```toml -[user] - email = "[email protected]" -``` - -To handle this, on each machine create a configuration file called -`~/.config/chezmoi/chezmoi.toml` defining variables that might vary from machine -to machine. For example, for your home machine: - -```toml -[data] - email = "[email protected]" -``` - -Note that all variable names will be converted to lowercase. This is due to a -feature of a library used by chezmoi. - -If you intend to store private data (e.g. access tokens) in -`~/.config/chezmoi/chezmoi.toml`, make sure it has permissions `0600`. - -If you prefer, you can use any format supported by -[Viper](https://github.com/spf13/viper) for your configuration file. This -includes JSON, YAML, and TOML. Variable names must start with a letter and be -followed by zero or more letters or digits. - -Then, add `~/.gitconfig` to chezmoi using the `--autotemplate` flag to turn it -into a template and automatically detect variables from the `data` section -of your `~/.config/chezmoi/chezmoi.toml` file: - -```console -$ chezmoi add --autotemplate ~/.gitconfig -``` - -You can then open the template (which will be saved in the file -`~/.local/share/chezmoi/dot_gitconfig.tmpl`): - -```console -$ chezmoi edit ~/.gitconfig -``` - -The file should look something like: - -```toml -[user] - email = {{ .email | quote }} -``` - -To disable automatic variable detection, use the `--template` or `-T` option to -`chezmoi add` instead of `--autotemplate`. - -Templates are often used to capture machine-specific differences. For example, -in your `~/.local/share/chezmoi/dot_bashrc.tmpl` you might have: - -``` -# common config -export EDITOR=vi - -# machine-specific configuration -{{- if eq .chezmoi.hostname "work-laptop" }} -# this will only be included in ~/.bashrc on work-laptop -{{- end }} -``` - -For a full list of variables, run: - -```console -$ chezmoi data -``` - -For more advanced usage, you can use the full power of the -[`text/template`](https://pkg.go.dev/text/template) language. chezmoi includes -all of the text functions from [sprig](http://masterminds.github.io/sprig/) and -its own [functions for interacting with password -managers](https://github.com/twpayne/chezmoi/blob/master/docs/REFERENCE.md#template-functions). - -Templates can be executed directly from the command line, without the need to -create a file on disk, with the `execute-template` command, for example: - -```console -$ chezmoi execute-template "{{ .chezmoi.os }}/{{ .chezmoi.arch }}" -``` - -This is useful when developing or debugging templates. - -Some password managers allow you to store complete files. The files can be -retrieved with chezmoi's template functions. For example, if you have a file -stored in 1Password with the UUID `uuid` then you can retrieve it with the -template: - -``` -{{- onepasswordDocument "uuid" -}} -``` - -The `-`s inside the brackets remove any whitespace before or after the template -expression, which is useful if your editor has added any newlines. - -If, after executing the template, the file contents are empty, the target file -will be removed. This can be used to ensure that files are only present on -certain machines. If you want an empty file to be created anyway, you will need -to give it an `empty_` prefix. - ---- - -### Ignore files or a directory on different machines - -For coarser-grained control of files and entire directories managed on different -machines, or to exclude certain files completely, you can create -`.chezmoiignore` files in the source directory. These specify a list of patterns -that chezmoi should ignore, and are interpreted as templates. An example -`.chezmoiignore` file might look like: - -``` -README.md -{{- if ne .chezmoi.hostname "work-laptop" }} -.work # only manage .work on work-laptop -{{- end }} -``` - -The use of `ne` (not equal) is deliberate. What we want to achieve is "only -install `.work` if hostname is `work-laptop`" but chezmoi installs everything by -default, so we have to turn the logic around and instead write "ignore `.work` -unless the hostname is `work-laptop`". - -Patterns can be excluded by prefixing them with a `!`, for example: - -``` -f* -!foo -``` - -will ignore all files beginning with an `f` except `foo`. - ---- - -### Use completely different dotfiles on different machines - -chezmoi's template functionality allows you to change a file's contents based on -any variable. For example, if you want `~/.bashrc` to be different on Linux and -macOS you would create a file in the source state called `dot_bashrc.tmpl` -containing: - -``` -{{ if eq .chezmoi.os "darwin" -}} -# macOS .bashrc contents -{{ else if eq .chezmoi.os "linux" -}} -# Linux .bashrc contents -{{ end -}} -``` - -However, if the differences between the two versions are so large that you'd -prefer to use completely separate files in the source state, you can achieve -this using a symbolic link template. Create the following files: - -`symlink_dot_bashrc.tmpl`: - -``` -.bashrc_{{ .chezmoi.os }} -``` - -`dot_bashrc_darwin`: - -``` - # macOS .bashrc contents -``` - -`dot_bashrc_linux`: - -``` -# Linux .bashrc contents -``` - -`.chezmoiignore` - -``` -{{ if ne .chezmoi.os "darwin" }} -.bashrc_darwin -{{ end }} -{{ if ne .chezmoi.os "linux" }} -.bashrc_linux -{{ end }} -``` - -This will make `~/.bashrc` a symlink to `.bashrc_darwin` on `darwin` and to -`.bashrc_linux` on `linux`. The `.chezmoiignore` configuration ensures that only -the OS-specific `.bashrc_os` file will be installed on each OS. - -#### Without using symlinks - -The same thing can be achieved using the include function. - -`dot_bashrc.tmpl` - -``` -{{ if eq .chezmoi.os "darwin" }} -{{ include ".bashrc_darwin" }} -{{ end }} -{{ if eq .chezmoi.os "linux" }} -{{ include ".bashrc_linux" }} -{{ end }} -``` - ---- - -### Create a config file on a new machine automatically - -`chezmoi init` can also create a config file automatically, if one does not -already exist. If your repo contains a file called `.chezmoi.<format>.tmpl` -where *format* is one of the supported config file formats (e.g. `json`, `toml`, -or `yaml`) then `chezmoi init` will execute that template to generate your -initial config file. - -Specifically, if you have `.chezmoi.toml.tmpl` that looks like this: - -``` -{{- $email := promptString "email" -}} -[data] - email = {{ $email | quote }} -``` - -Then `chezmoi init` will create an initial `chezmoi.toml` using this template. -`promptString` is a special function that prompts the user (you) for a value. - -To test this template, use `chezmoi execute-template` with the `--init` and -`--promptString` flags, for example: - -```console -$ chezmoi execute-template --init --promptString [email protected] < ~/.local/share/chezmoi/.chezmoi.toml.tmpl -``` - ---- - -### Re-create your config file - -If you change your config file template, chezmoi will warn you if your current -config file was not generated from that template. You can re-generate your -config file by running: - -```console -$ chezmoi init -``` - -If you are using any `prompt*` template functions in your config file template -you will be prompted again. However, you can avoid this with the following -example template logic: - -``` -{{- $email := "" -}} -{{- if (hasKey . "email") -}} -{{- $email = .email -}} -{{- else -}} -{{- $email = promptString "email" -}} -{{- end -}} - -[data] - email = {{ $email | quote }} -``` - -This will cause chezmoi to first try to re-use the existing `$email` variable -and fallback to `promptString` only if it is not set. - ---- - -### Handle different file locations on different systems with the same contents - -If you want to have the same file contents in different locations on different -systems, but maintain only a single file in your source state, you can use -a shared template. - -Create the common file in the `.chezmoitemplates` directory in the source state. For -example, create `.chezmoitemplates/file.conf`. The contents of this file are -available in templates with the `template *name* .` function where *name* is the -name of the file (`.` passes the current data to the template code in `file.conf`; -see https://pkg.go.dev/text/template#hdr-Actions for details). - -Then create files for each system, for example `Library/Application -Support/App/file.conf.tmpl` for macOS and `dot_config/app/file.conf.tmpl` for -Linux. Both template files should contain `{{- template "file.conf" . -}}`. - -Finally, tell chezmoi to ignore files where they are not needed by adding lines -to your `.chezmoiignore` file, for example: - -``` -{{ if ne .chezmoi.os "darwin" }} -Library/Application Support/App/file.conf -{{ end }} -{{ if ne .chezmoi.os "linux" }} -.config/app/file.conf -{{ end }} -``` - ---- - -### Create an archive of your dotfiles - -`chezmoi archive` creates an archive containing the target state. This can be -useful for generating target state for a different machine. You can specify a -different configuration file (including template variables) with the `--config` -option. - ---- - -## Keep data private - -chezmoi automatically detects when files and directories are private when adding -them by inspecting their permissions. Private files and directories are stored -in `~/.local/share/chezmoi` as regular, public files with permissions `0644` and -the name prefix `private_`. For example: - -``` -$ chezmoi add ~/.netrc -``` - -will create `~/.local/share/chezmoi/private_dot_netrc` (assuming `~/.netrc` is -not world- or group- readable, as it should be). This file is still private -because `~/.local/share/chezmoi` is not group- or world- readable or executable. -chezmoi checks that the permissions of `~/.local/share/chezmoi` are `0700` on -every run and will print a warning if they are not. - -It is common that you need to store access tokens in config files, e.g. a -[GitHub access -token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/). -There are several ways to keep these tokens secure, and to prevent them leaving -your machine. - ---- - -### Use 1Password - -chezmoi includes support for [1Password](https://1password.com/) using the -[1Password CLI](https://support.1password.com/command-line-getting-started/) to -expose data as a template function. - -Log in and get a session using: - -```console -$ eval $(op signin <subdomain>.1password.com <email>) -``` - -The output of `op get item <uuid>` is available as the `onepassword` template -function. chezmoi parses the JSON output and returns it as structured data. For -example, if the output of `op get item "<uuid>"` is: - -```json -{ - "uuid": "<uuid>", - "details": { - "password": "xxx" - } -} -``` - -Then you can access `details.password` with the syntax: - -``` -{{ (onepassword "<uuid>").details.password }} -``` - -Login details fields can be retrieved with the `onepasswordDetailsFields` -function, for example: - -``` -{{- (onepasswordDetailsFields "uuid").password.value }} -``` - -Documents can be retrieved with: - -``` -{{- onepasswordDocument "uuid" -}} -``` - -Note the extra `-` after the opening `{{` and before the closing `}}`. This -instructs the template language to remove any whitespace before and after the -substitution. This removes any trailing newline added by your editor when saving -the template. - -#### 1Password sign-in prompt - -chezmoi will verify the availability and validity of a session token in the -current environment. If it is missing or expired, you will be interactively -prompted to sign-in again. - -In the past chezmoi used to simply exit with an error when no valid session was -available. If you'd like to restore that behavior, set the following option in -your configuration file (`chezmoi.toml`): - -```toml -[onepassword] - prompt = false -``` - -**A session token verified or acquired interactively will be passed to the -1Password CLI through a command-line parameter, which could be visible to other -users of the same system. You should disable the prompt on shared machines for -improved security.** - ---- - -### Use Bitwarden - -chezmoi includes support for [Bitwarden](https://bitwarden.com/) using the -[Bitwarden CLI](https://github.com/bitwarden/cli) to expose data as a template -function. - -Log in to Bitwarden using: - -```console -$ bw login <bitwarden-email> -``` - -Unlock your Bitwarden vault: - -```console -$ bw unlock -``` - -Set the `BW_SESSION` environment variable, as instructed. - -The structured data from `bw get` is available as the `bitwarden` template -function in your config files, for example: - -``` -username = {{ (bitwarden "item" "example.com").login.username }} -password = {{ (bitwarden "item" "example.com").login.password }} -``` - -Custom fields can be accessed with the `bitwardenFields` template function. For -example, if you have a custom field named `token` you can retrieve its value -with: - -``` -{{ (bitwardenFields "item" "example.com").token.value }} -``` - ---- - -### Use gopass - -chezmoi includes support for [gopass](https://www.gopass.pw/) using the gopass CLI. - -The first line of the output of `gopass show <pass-name>` is available as the -`gopass` template function, for example: - -``` -{{ gopass "<pass-name>" }} -``` - ---- - -### Use KeePassXC - -chezmoi includes support for [KeePassXC](https://keepassxc.org) using the -KeePassXC CLI (`keepassxc-cli`) to expose data as a template function. - -Provide the path to your KeePassXC database in your configuration file: - -```toml -[keepassxc] - database = "/home/user/Passwords.kdbx" -``` - -The structured data from `keepassxc-cli show $database` is available as the -`keepassxc` template function in your config files, for example: - -``` -username = {{ (keepassxc "example.com").UserName }} -password = {{ (keepassxc "example.com").Password }} -``` - -Additional attributes are available through the `keepassxcAttribute` function. -For example, if you have an entry called `SSH Key` with an additional attribute -called `private-key`, its value is available as: - -``` -{{ keepassxcAttribute "SSH Key" "private-key" }} -``` - ---- - -### Use Keychain or Windows Credentials Manager - -chezmoi includes support for Keychain (on macOS), GNOME Keyring (on Linux), and -Windows Credentials Manager (on Windows) via the -[`zalando/go-keyring`](https://github.com/zalando/go-keyring) library. - -Set values with: - -```console -$ chezmoi secret keyring set --service=<service> --user=<user> -Value: xxxxxxxx -``` - -The value can then be used in templates using the `keyring` function which takes -the service and user as arguments. - -For example, save a GitHub access token in keyring with: - -```console -$ chezmoi secret keyring set --service=github --user=<github-username> -Value: xxxxxxxx -``` - -and then include it in your `~/.gitconfig` file with: - -``` -[github] - user = {{ .github.user | quote }} - token = {{ keyring "github" .github.user | quote }} -``` - -You can query the keyring from the command line: - -```console -$ chezmoi secret keyring get --service=github --user=<github-username> -``` - ---- - -### Use LastPass - -chezmoi includes support for [LastPass](https://lastpass.com) using the -[LastPass CLI](https://lastpass.github.io/lastpass-cli/lpass.1.html) to expose -data as a template function. - -Log in to LastPass using: - -```console -$ lpass login <lastpass-username> -``` - -Check that `lpass` is working correctly by showing password data: - -``` console -$ lpass show --json <lastpass-entry-id> -``` - -where `<lastpass-entry-id>` is a [LastPass Entry -Specification](https://lastpass.github.io/lastpass-cli/lpass.1.html#_entry_specification). - -The structured data from `lpass show --json id` is available as the `lastpass` -template function. The value will be an array of objects. You can use the -`index` function and `.Field` syntax of the `text/template` language to extract -the field you want. For example, to extract the `password` field from first the -"GitHub" entry, use: - -``` -githubPassword = {{ (index (lastpass "GitHub") 0).password | quote }} -``` - -chezmoi automatically parses the `note` value of the Lastpass entry as -colon-separated key-value pairs, so, for example, you can extract a private SSH -key like this: - -``` -{{ (index (lastpass "SSH") 0).note.privateKey }} -``` - -Keys in the `note` section written as `CamelCase Words` are converted to -`camelCaseWords`. - -If the `note` value does not contain colon-separated key-value pairs, then you -can use `lastpassRaw` to get its raw value, for example: - -``` -{{ (index (lastpassRaw "SSH Private Key") 0).note }} -``` - ---- - -### Use pass - -chezmoi includes support for [pass](https://www.passwordstore.org/) using the -pass CLI. - -The first line of the output of `pass show <pass-name>` is available as the -`pass` template function, for example: - -``` -{{ pass "<pass-name>" }} -``` - ---- - -### Use Vault - -chezmoi includes support for [Vault](https://www.vaultproject.io/) using the -[Vault CLI](https://www.vaultproject.io/docs/commands/) to expose data as a -template function. - -The vault CLI needs to be correctly configured on your machine, e.g. the -`VAULT_ADDR` and `VAULT_TOKEN` environment variables must be set correctly. -Verify that this is the case by running: - -```console -$ vault kv get -format=json <key> -``` - -The structured data from `vault kv get -format=json` is available as the `vault` -template function. You can use the `.Field` syntax of the `text/template` -language to extract the data you want. For example: - -``` -{{ (vault "<key>").data.data.password }} -``` - ---- - -### Use a custom password manager - -You can use any command line tool that outputs secrets either as a string or in -JSON format. Choose the binary by setting `secret.command` in your configuration -file. You can then invoke this command with the `secret` and `secretJSON` -template functions which return the raw output and JSON-decoded output -respectively. All of the above secret managers can be supported in this way: - -| Secret Manager | `secret.command` | Template skeleton | -| --------------- | ---------------- | ------------------------------------------------- | -| 1Password | `op` | `{{ secretJSON "get" "item" <id> }}` | -| Bitwarden | `bw` | `{{ secretJSON "get" <id> }}` | -| HashiCorp Vault | `vault` | `{{ secretJSON "kv" "get" "-format=json" <id> }}` | -| LastPass | `lpass` | `{{ secretJSON "show" "--json" <id> }}` | -| KeePassXC | `keepassxc-cli` | Not possible (interactive command only) | -| pass | `pass` | `{{ secret "show" <id> }}` | - ---- - -### Encrypt whole files with gpg - -chezmoi supports encrypting files with [gpg](https://www.gnupg.org/). Encrypted -files are stored in the source state and automatically be decrypted when -generating the target state or printing a file's contents with `chezmoi cat`. -`chezmoi edit` will transparently decrypt the file before editing and re-encrypt -it afterwards. - ---- - -#### Asymmetric (private/public-key) encryption - -Specify the encryption key to use in your configuration file (`chezmoi.toml`) -with the `gpg.recipient` key: - -```toml -encryption = "gpg" -[gpg] - recipient = "..." -``` - -Add files to be encrypted with the `--encrypt` flag, for example: - -```console -$ chezmoi add --encrypt ~/.ssh/id_rsa -``` - -chezmoi will encrypt the file with: - -```bash -gpg --armor --recipient ${gpg.recipient} --encrypt -``` - -and store the encrypted file in the source state. The file will automatically be -decrypted when generating the target state. - ---- - -#### Symmetric encryption - -Specify symmetric encryption in your configuration file: - -```toml -encryption = "gpg" -[gpg] - symmetric = true -``` - -Add files to be encrypted with the `--encrypt` flag, for example: - -```console -$ chezmoi add --encrypt ~/.ssh/id_rsa -``` - -chezmoi will encrypt the file with: - -```bash -gpg --armor --symmetric -``` - ---- - -### Encrypt whole files with age - -chezmoi supports encrypting files with [age](https://age-encryption.org/). -Encrypted files are stored in the source state and automatically be decrypted -when generating the target state or printing a file's contents with `chezmoi -cat`. `chezmoi edit` will transparently decrypt the file before editing and -re-encrypt it afterwards. - -Generate a key using `age-keygen`: - -```console -$ age-keygen -o $HOME/key.txt -Public key: age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p -``` - -Specify age encryption in your configuration file, being sure to specify at -least the identity and one recipient: - -```toml -encryption = "age" -[age] - identity = "/home/user/key.txt" - recipient = "age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p" -``` - -Add files to be encrypted with the `--encrypt` flag, for example: - -```console -$ chezmoi add --encrypt ~/.ssh/id_rsa -``` - -chezmoi supports multiple recipients and recipient files, and multiple -identities. - ---- - -#### Symmetric encryption - -To use age's symmetric encryption, specify a single identity and enable -symmetric encryption in your config file, for example: - -```toml -encryption = "age" -[age] - identity = "~/.ssh/id_rsa" - symmetric = true -``` - ---- - -#### Symmetric encryption with a passphrase - -To use age's symmetric encryption with a passphrase, set `age.passphrase` to -`true` in your config file, for example: - -```toml -encryption = "age" -[age] - passphrase = true -``` - -You will be prompted for the passphrase whenever you run `chezmoi add --encrypt` -and whenever chezmoi needs to decrypt the file, for example when you run -`chezmoi apply`, `chezmoi diff`, or `chezmoi status`. - ---- - -### Use a private configuration file and template variables - -Typically, `~/.config/chezmoi/chezmoi.toml` is not checked in to version control -and has permissions 0600. You can store tokens as template values in the `data` -section. For example, if your `~/.config/chezmoi/chezmoi.toml` contains: - -```toml -[data.github] - user = "<github-username>" - token = "<github-token>" -``` - -Your `~/.local/share/chezmoi/private_dot_gitconfig.tmpl` can then contain: - -``` -{{- if (index . "github") }} -[github] - user = {{ .github.user | quote }} - token = {{ .github.token | quote }} -{{- end }} -``` - - -Any config files containing tokens in plain text should be private (permissions -`0600`). - ---- - -## Use scripts to perform actions - ---- - -### Understand how scripts work - -chezmoi supports scripts, which are executed when you run `chezmoi apply`. The -scripts can either run every time you run `chezmoi apply`, or only when their -contents have changed. - -In verbose mode, the script's contents will be printed before executing it. In -dry-run mode, the script is not executed. - -Scripts are any file in the source directory with the prefix `run_`, and are -executed in alphabetical order. Scripts that should only be run if they have not -been run before have the prefix `run_once_`. Scripts that should be run whenever -their contents change have the `run_onchange_` prefix. - -Scripts break chezmoi's declarative approach, and as such should be used -sparingly. Any script should be idempotent, even `run_once_` and -`run_onchange_` scripts. - -Scripts must be created manually in the source directory, typically by running -`chezmoi cd` and then creating a file with a `run_` prefix. Scripts are executed -directly using `exec` and must include a shebang line or be executable binaries. -There is no need to set the executable bit on the script. - -Scripts with the suffix `.tmpl` are treated as templates, with the usual -template variables available. If, after executing the template, the result is -only whitespace or an empty string, then the script is not executed. This is -useful for disabling scripts. - ---- - -### Install packages with scripts - -Change to the source directory and create a file called -`run_once_install-packages.sh`: - -```console -$ chezmoi cd -$ $EDITOR run_once_install-packages.sh -``` - -In this file create your package installation script, e.g. - -```sh -#!/bin/sh -sudo apt install ripgrep -``` - -The next time you run `chezmoi apply` or `chezmoi update` this script will be -run. As it has the `run_once_` prefix, it will not be run again unless its -contents change, for example if you add more packages to be installed. - -This script can also be a template. For example, if you create -`run_once_install-packages.sh.tmpl` with the contents: - -``` -{{ if eq .chezmoi.os "linux" -}} -#!/bin/sh -sudo apt install ripgrep -{{ else if eq .chezmoi.os "darwin" -}} -#!/bin/sh -brew install ripgrep -{{ end -}} -``` - -This will install `ripgrep` on both Debian/Ubuntu Linux systems and macOS. - ---- - -### Run a script when the contents of another file changes - -chezmoi's `run_` scripts are run every time you run `chezmoi apply`, whereas -`run_once_` scripts are run only when their contents have changed, after -executing them as templates. You use this to cause a `run_once_` script to run -when the contents of another file has changed by including a checksum of the -other file's contents in the script. - -For example, if your [dconf](https://wiki.gnome.org/Projects/dconf) settings are -stored in `dconf.ini` in your source directory then you can make `chezmoi apply` -only load them when the contents of `dconf.ini` has changed by adding the -following script as `run_once_dconf-load.sh.tmpl`: - -``` -#!/bin/bash - -# dconf.ini hash: {{ include "dconf.ini" | sha256sum }} -dconf load / {{ joinPath .chezmoi.sourceDir "dconf.ini" | quote }} -``` - -As the SHA256 sum of `dconf.ini` is included in a comment in the script, the -contents of the script will change whenever the contents of `dconf.ini` are -changed, so chezmoi will re-run the script whenever the contents of `dconf.ini` -change. - -In this example you should also add `dconf.ini` to `.chezmoiignore` so chezmoi -does not create `dconf.ini` in your home directory. - ---- - -### Clear the state of `run_once_` scripts - -chezmoi stores whether and when `run_once_` scripts have been run in the -`scriptState` bucket of its persistent state. To clear the state of `run_once_` -scripts, run: - -```console -$ chezmoi state delete-bucket --bucket=scriptState -``` - ---- - -## Use chezmoi on macOS - ---- - -### Use `brew bundle` to manage your brews and casks - -Homebrew's [`brew bundle` -subcommand](https://docs.brew.sh/Manpage#bundle-subcommand) allows you to -specify a list of brews and casks to be installed. You can integrate this with -chezmoi by creating a `run_once_` script. For example, create a file in your -source directory called `run_once_before_install-packages-darwin.sh.tmpl` -containing: - -``` -{{- if (eq .chezmoi.os "darwin") -}} -#!/bin/bash - -brew bundle --no-lock --file=/dev/stdin <<EOF -brew "git" -cask "google-chrome" -EOF -{{ end -}} -``` - -Note that the `Brewfile` is embedded directly in the script with a bash here -document. chezmoi will run this script whenever its contents change, i.e. when -you add or remove brews or casks. - ---- - -## Use chezmoi on Windows - ---- - -### Detect Windows Subsystem for Linux (WSL) - -WSL can be detected by looking for the string `Microsoft` or `microsoft` in -`/proc/sys/kernel/osrelease`, which is available in the template variable -`.chezmoi.kernel.osrelease`, for example: - -``` -{{ if (eq .chezmoi.os "linux") }} -{{ if (.chezmoi.kernel.osrelease | lower | contains "microsoft") }} -# WSL-specific code -{{ end }} -{{ end }} -``` - ---- - -### Run a PowerShell script as admin on Windows - -Put the following at the top of your script: - -```powershell -# Self-elevate the script if required -if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { - if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) { - $CommandLine = "-NoExit -File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments - Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine - Exit - } -} -``` - ---- - -## Use chezmoi with GitHub Codespaces, Visual Studio Codespaces, or Visual Studio Code Remote - Containers - -The following assumes you are using chezmoi 1.8.4 or later. It does not work -with earlier versions of chezmoi. - -You can use chezmoi to manage your dotfiles in [GitHub -Codespaces](https://docs.github.com/en/github/developing-online-with-codespaces/personalizing-codespaces-for-your-account), -[Visual Studio -Codespaces](https://docs.microsoft.com/en/visualstudio/codespaces/reference/personalizing), -and [Visual Studio Code Remote - -Containers](https://code.visualstudio.com/docs/remote/containers#_personalizing-with-dotfile-repositories). - -For a quick start, you can clone the [`chezmoi/dotfiles` -repository](https://github.com/chezmoi/dotfiles) which supports Codespaces out -of the box. - -The workflow is different to using chezmoi on a new machine, notably: -* These systems will automatically clone your `dotfiles` repo to `~/dotfiles`, - so there is no need to clone your repo yourself. -* The installation script must be non-interactive. -* When running in a Codespace, the environment variable `CODESPACES` will be set - to `true`. You can read its value with the [`env` template - function](http://masterminds.github.io/sprig/os.html). - -First, if you are using a chezmoi configuration file template, ensure that it is -non-interactive when running in Codespaces, for example, `.chezmoi.toml.tmpl` -might contain: - -``` -{{- $codespaces:= env "CODESPACES" | not | not -}} -sourceDir = {{ .chezmoi.sourceDir | quote }} - -[data] - name = "Your name" - codespaces = {{ $codespaces }} -{{- if $codespaces }}{{/* Codespaces dotfiles setup is non-interactive, so set an email address */}} - email = "[email protected]" -{{- else }}{{/* Interactive setup, so prompt for an email address */}} - email = {{ promptString "email" | quote }} -{{- end }} -``` - -This sets the `codespaces` template variable, so you don't have to repeat `(env -"CODESPACES")` in your templates. It also sets the `sourceDir` configuration to -the `--source` argument passed in `chezmoi init`. - -Second, create an `install.sh` script that installs chezmoi and your dotfiles: - -```sh -#!/bin/sh - -set -e # -e: exit on error - -if [ ! "$(command -v chezmoi)" ]; then - bin_dir="$HOME/.local/bin" - chezmoi="$bin_dir/chezmoi" - if [ "$(command -v curl)" ]; then - sh -c "$(curl -fsLS https://chezmoi.io/get)" -- -b "$bin_dir" - elif [ "$(command -v wget)" ]; then - sh -c "$(wget -qO- https://chezmoi.io/get)" -- -b "$bin_dir" - else - echo "To install chezmoi, you must have curl or wget installed." >&2 - exit 1 - fi -else - chezmoi=chezmoi -fi - -# POSIX way to get script's dir: https://stackoverflow.com/a/29834779/12156188 -script_dir="$(cd -P -- "$(dirname -- "$(command -v -- "$0")")" && pwd -P)" -# exec: replace current process with chezmoi init -exec "$chezmoi" init --apply "--source=$script_dir" -``` - -Ensure that this file is executable (`chmod a+x install.sh`), and add -`install.sh` to your `.chezmoiignore` file. - -It installs the latest version of chezmoi in `~/.local/bin` if needed, and then -`chezmoi init ...` invokes chezmoi to create its configuration file and -initialize your dotfiles. `--apply` tells chezmoi to apply the changes -immediately, and `--source=...` tells chezmoi where to find the cloned -`dotfiles` repo, which in this case is the same folder in which the script is -running from. - -If you do not use a chezmoi configuration file template you can use `chezmoi -apply --source=$HOME/dotfiles` instead of `chezmoi init ...` in `install.sh`. - -Finally, modify any of your templates to use the `codespaces` variable if -needed. For example, to install `vim-gtk` on Linux but not in Codespaces, your -`run_once_install-packages.sh.tmpl` might contain: - -``` -{{- if (and (eq .chezmoi.os "linux") (not .codespaces)) -}} -#!/bin/sh -sudo apt install -y vim-gtk -{{- end -}} -``` - ---- - -## Customize chezmoi - ---- - -### Use a subdirectory of your dotfiles repo as the root of the source state - -By default, chezmoi uses the root of your dotfiles repo as the root of the -source state. If your source state contains many entries in its root, then your -target directory (usually your home directory) will in turn be filled with many -entries in its root as well. You can reduce the number of entries by keeping -`.chezmoiignore` up to date, but this can become tiresome. - -Instead, you can specify that chezmoi should read the source state from a -subdirectory of the source directory instead by creating a file called -`.chezmoiroot` containing the relative path to this subdirectory. - -For example, if `.chezmoiroot` contains: - -``` -home -``` - -Then chezmoi will read the source state from the `home` subdirectory of your -source directory, for example the desired state of `~/.gitconfig` will be read -from `~/.local/share/chezmoi/home/dot_gitconfig` (instead of -`~/.local/share/chezmoi/dot_gitconfig`). - -When migrating an existing chezmoi dotfiles repo to use `.chezmoiroot` you will -need to move the relevant files in to the new root subdirectory manually. You do -not need to move files that are ignored by chezmoi in all cases (i.e. are listed -in `.chezmoiignore` when executed as a template on all machines), and you can -afterwards remove their entries from `home/.chezmoiignore`. - ---- - -### Don't show scripts in the diff output - -By default, `chezmoi diff` will show all changes, including the contents of -scripts that will be run. You can exclude scripts from the diff output by -setting the `diff.exclude` configuration variable in your configuration file, -for example: - -```toml -[diff] - exclude = ["scripts"] -``` - ---- - -### Customize the diff pager - -You can change the diff format, and/or pipe the output into a pager of your -choice by setting `diff.pager` configuration variable. For example, to use -[`diff-so-fancy`](https://github.com/so-fancy/diff-so-fancy) specify: - -```toml -[diff] - pager = "diff-so-fancy" -``` - -The pager can be disabled using the `--no-pager` flag or by setting `diff.pager` -to an empty string. - ---- - -### Use a custom diff tool - -By default, chezmoi uses a built-in diff. You can use a custom tool by setting -the `diff.command` and `diff.args` configuration variables. The elements of -`diff.args` are interpreted as templates with the variables `.Destination` and -`.Target` containing filenames of the file in the destination state and the -target state respectively. For example, to use [meld](https://meldmerge.org/), -specify: - -```toml -[diff] - command = "meld" - args = ["--diff", "{{ .Destination }}", "{{ .Target }}"] -``` - ---- - -### Use a custom merge tool - -By default, chezmoi uses vimdiff. You can use a custom tool by setting the -`merge.command` and `merge.args` configuration variables. The elements of -`merge.args` are interprested as templates with the variables `.Destination`, -`.Source`, and `.Target` containing filenames of the file in the destination -state, source state, and target state respectively. For example, to use -[neovim's diff mode](https://neovim.io/doc/user/diff.html), specify: - -```toml -[merge] - command = "nvim" - args = ["-d", "{{ .Destination }}", "{{ .Source }}", "{{ .Target }}"] -``` - ---- - -### Use an HTTP or SOCKS5 proxy - -chezmoi supports HTTP, HTTPS, and SOCKS5 proxies. Set the `HTTP_PROXY`, -`HTTPS_PROXY`, and `NO_PROXY` environment variables, or their lowercase -equivalents, for example: - -```console -$ HTTP_PROXY=socks5://127.0.0.1:1080 chezmoi apply -R -``` - ---- - -## Migrating to chezmoi from another dotfile manager - ---- - -### Migrate from a dotfile manager that uses symlinks - -Many dotfile managers replace dotfiles with symbolic links to files in a common -directory. If you `chezmoi add` such a symlink, chezmoi will add the symlink, -not the file. To assist with migrating from symlink-based systems, use the -`--follow` option to `chezmoi add`, for example: - -```console -$ chezmoi add --follow ~/.bashrc -``` - -This will tell `chezmoi add` that the target state of `~/.bashrc` is the target -of the `~/.bashrc` symlink, rather than the symlink itself. When you run -`chezmoi apply`, chezmoi will replace the `~/.bashrc` symlink with the file -contents. - ---- - -## Migrate away from chezmoi - -chezmoi provides several mechanisms to help you move to an alternative dotfile -manager (or even no dotfile manager at all) in the future: - -* chezmoi creates your dotfiles just as if you were not using a dotfile manager - at all. Your dotfiles are regular files, directories, and symlinks. You can - run [`chezmoi - purge`](https://github.com/twpayne/chezmoi/blob/master/docs/REFERENCE.md#purge) - to delete all traces of chezmoi and then, if you're migrating to a new dotfile - manager, then you can use whatever mechanism it provides to add your dotfiles - to your new system. -* chezmoi has a [`chezmoi - archive`](https://github.com/twpayne/chezmoi/blob/master/docs/REFERENCE.md#archive) - command that generates a tarball of your dotfiles. You can replace the - contents of your dotfiles repo with the contents of the archive and you've - effectively immediately migrated away from chezmoi. -* chezmoi has a [`chezmoi - dump`](https://github.com/twpayne/chezmoi/blob/master/docs/REFERENCE.md#dump-target) - command that dumps the interpreted (target) state in a machine-readable form, - so you can write scripts around chezmoi. diff --git a/docs/INSTALL.md b/docs/INSTALL.md deleted file mode 100644 index 75d713c9116..00000000000 --- a/docs/INSTALL.md +++ /dev/null @@ -1,118 +0,0 @@ -# chezmoi install guide - -<!--- toc ---> -* [One-line binary install](#one-line-binary-install) -* [One-line package install](#one-line-package-install) -* [Pre-built Linux packages](#pre-built-linux-packages) -* [Pre-built binaries](#pre-built-binaries) -* [All pre-built Linux packages and binaries](#all-pre-built-linux-packages-and-binaries) -* [From source](#from-source) - ---- - -## One-line binary install - -Install the correct binary for your operating system and architecture in `./bin` -with a single command: - -```console -$ sh -c "$(curl -fsLS chezmoi.io/get)" -``` - -Or, if you have `wget` instead of `curl`: - -```console -$ sh -c "$(wget -qO- chezmoi.io/get)" -``` - -If you already have a dotfiles repo using chezmoi on GitHub at -`https://github.com/<github-username>/dotfiles` then you can install chezmoi and -your dotfiles with the single command: - -```console -$ sh -c "$(curl -fsLS chezmoi.io/get)" -- init --apply <github-username> -``` - -On systems with Powershell, use: - -```powershell -(iwr -UseBasicParsing https://chezmoi.io/get.ps1).Content | powershell -c - -``` - ---- - -## One-line package install - -Install chezmoi with a single command. - -| OS | Method | Command | -| ------------ | ---------- | ------------------------------------------------------------------------------------------- | -| Linux | snap | `snap install chezmoi --classic` | -| Linux | Linuxbrew | `brew install chezmoi` | -| Alpine Linux | apk | `apk add chezmoi` | -| Arch Linux | pacman | `pacman -S chezmoi` | -| Guix Linux | guix | `guix install chezmoi` | -| OpenIndiana | pkg | `pkg install application/chezmoi` | -| Nix / NixOS | nix-env | `nix-env -i chezmoi` | -| Void Linux | xbps | `xbps-install -S chezmoi` | -| macOS | Homebrew | `brew install chezmoi` | -| macOS | MacPorts | `port install chezmoi` | -| Windows | Scoop | `scoop bucket add twpayne https://github.com/twpayne/scoop-bucket && scoop install chezmoi` | -| Windows | Chocolatey | `choco install chezmoi` | -| FreeBSD | pkg | `pkg install chezmoi` | -| *multiple* | asdf | `asdf plugin add chezmoi && asdf install chezmoi <version>` | - ---- - -## Pre-built Linux packages - -Download a package for your operating system and architecture and install it -with your package manager. - -| Distribution | Architectures | Package | -| ------------ | --------------------------------------------------------- | ----------------------------------------------------------- | -| Alpine | `386`, `amd64`, `arm64`, `arm`, `ppc64`, `ppc64le` | [`apk`](https://github.com/twpayne/chezmoi/releases/latest) | -| Debian | `amd64`, `arm64`, `armel`, `i386`, `ppc64`, `ppc64le` | [`deb`](https://github.com/twpayne/chezmoi/releases/latest) | -| RedHat | `aarch64`, `armhfp`, `i686`, `ppc64`, `ppc64le`, `x86_64` | [`rpm`](https://github.com/twpayne/chezmoi/releases/latest) | -| OpenSUSE | `aarch64`, `armhfp`, `i686`, `ppc64`, `ppc64le`, `x86_64` | [`rpm`](https://github.com/twpayne/chezmoi/releases/latest) | -| Ubuntu | `amd64`, `arm64`, `armel`, `i386`, `ppc64`, `ppc64le` | [`deb`](https://github.com/twpayne/chezmoi/releases/latest) | - ---- - -## Pre-built binaries - -Download an archive for your operating system containing a pre-built binary, -documentation, and shell completions. - -| OS | Architectures | Archive | -| ---------- | --------------------------------------------------- | -------------------------------------------------------------- | -| FreeBSD | `amd64`, `arm`, `arm64`, `i386` | [`tar.gz`](https://github.com/twpayne/chezmoi/releases/latest) | -| Illumos | `amd64` | [`tar.gz`](https://github.com/twpayne/chezmoi/releases/latest) | -| Linux | `amd64`, `arm`, `arm64`, `i386`, `ppc64`, `ppc64le` | [`tar.gz`](https://github.com/twpayne/chezmoi/releases/latest) | -| macOS | `amd64`, `arm64` | [`tar.gz`](https://github.com/twpayne/chezmoi/releases/latest) | -| OpenBSD | `amd64`, `arm`, `arm64`, `i386` | [`tar.gz`](https://github.com/twpayne/chezmoi/releases/latest) | -| Solaris | `amd64` | [`tar.gz`](https://github.com/twpayne/chezmoi/releases/latest) | -| Windows | `amd64`, `arm`, `i386` | [`zip`](https://github.com/twpayne/chezmoi/releases/latest) | - ---- - -## All pre-built Linux packages and binaries - -All pre-built binaries and packages can be found on the [chezmoi GitHub releases -page](https://github.com/twpayne/chezmoi/releases/latest). - ---- - -## From source - -Download, build, and install chezmoi for your system: - -```console -$ git clone https://github.com/twpayne/chezmoi.git -$ cd chezmoi -$ make install -``` - -Building chezmoi requires Go 1.16 or later. - ---- diff --git a/docs/REFERENCE.md b/docs/REFERENCE.md deleted file mode 100644 index 8c4b48dfe02..00000000000 --- a/docs/REFERENCE.md +++ /dev/null @@ -1,2741 +0,0 @@ -# chezmoi reference manual - -Manage your dotfiles across multiple machines, securely. - -<!--- toc ---> -* [Concepts](#concepts) -* [Global command line flags](#global-command-line-flags) - * [`--cache` *directory*](#--cache-directory) - * [`--color` *value*](#--color-value) - * [`-c`, `--config` *filename*](#-c---config-filename) - * [`--config-format` `json`|`toml`|`yaml`](#--config-format-jsontomlyaml) - * [`-D`, `--destination` *directory*](#-d---destination-directory) - * [`-n`, `--dry-run`](#-n---dry-run) - * [`--force`](#--force) - * [`-h`, `--help`](#-h---help) - * [`-k`, `--keep-going`](#-k---keep-going) - * [`--no-pager`](#--no-pager) - * [`--no-tty`](#--no-tty) - * [`-o`, `--output` *filename*](#-o---output-filename) - * [`--persistent-state` *filename*](#--persistent-state-filename) - * [`-R`, `--refresh-externals`](#-r---refresh-externals) - * [`-S`, `--source` *directory*](#-s---source-directory) - * [`--use-builtin-age` *value*](#--use-builtin-age-value) - * [`--use-builtin-git` *value*](#--use-builtin-git-value) - * [`-v`, `--verbose`](#-v---verbose) - * [`--version`](#--version) - * [`-w`, `--working-tree` *directory*](#-w---working-tree-directory) -* [Common command line flags](#common-command-line-flags) - * [`-f`, `--format` `json`|`yaml`](#-f---format-jsonyaml) - * [`-i`, `--include` *types*](#-i---include-types) - * [`-r`, `--recursive`](#-r---recursive) - * [`-x`, `--exclude` *types*](#-x---exclude-types) -* [Developer command line flags](#developer-command-line-flags) - * [`--cpu-profile` *filename*](#--cpu-profile-filename) - * [`--debug`](#--debug) - * [`--gops`](#--gops) -* [Configuration file](#configuration-file) - * [Variables](#variables) - * [Examples](#examples) -* [Source state attributes](#source-state-attributes) -* [Target types](#target-types) - * [Files](#files) - * [Directories](#directories) - * [Symbolic links](#symbolic-links) - * [Scripts](#scripts) - * [`symlink` mode](#symlink-mode) -* [Application order](#application-order) -* [Special files and directories](#special-files-and-directories) - * [`.chezmoi.<format>.tmpl`](#chezmoiformattmpl) - * [`.chezmoidata.<format>`](#chezmoidataformat) - * [`.chezmoiexternal.<format>`](#chezmoiexternalformat) - * [`.chezmoiignore`](#chezmoiignore) - * [`.chezmoiremove`](#chezmoiremove) - * [`.chezmoiroot`](#chezmoiroot) - * [`.chezmoiscripts`](#chezmoiscripts) - * [`.chezmoitemplates`](#chezmoitemplates) - * [`.chezmoiversion`](#chezmoiversion) -* [Commands](#commands) - * [`add` *target*...](#add-target) - * [`apply` [*target*...]](#apply-target) - * [`archive` [*target*....]](#archive-target) - * [`cat` *target*...](#cat-target) - * [`cd`](#cd) - * [`chattr` *modifier* *target*...](#chattr-modifier-target) - * [`completion` *shell*](#completion-shell) - * [`data`](#data) - * [`decrypt` [*file*...]](#decrypt-file) - * [`diff` [*target*...]](#diff-target) - * [`docs` [*regexp*]](#docs-regexp) - * [`doctor`](#doctor) - * [`dump` [*target*...]](#dump-target) - * [`edit` [*target*...]](#edit-target) - * [`edit-config`](#edit-config) - * [`encrypt` [*file*...]](#encrypt-file) - * [`execute-template` [*template*...]](#execute-template-template) - * [`forget` *target*...](#forget-target) - * [`git` [*arg*...]](#git-arg) - * [`help` [*command*...]](#help-command) - * [`init` [*repo*]](#init-repo) - * [`import` *filename*](#import-filename) - * [`list`](#list) - * [`manage` *target*...](#manage-target) - * [`managed`](#managed) - * [`merge` *target*...](#merge-target) - * [`merge-all`](#merge-all) - * [`purge`](#purge) - * [`remove` *target*...](#remove-target) - * [`re-add`](#re-add) - * [`rm` *target*...](#rm-target) - * [`secret`](#secret) - * [`source-path` [*target*...]](#source-path-target) - * [`state`](#state) - * [`status`](#status) - * [`unmanage` *target*...](#unmanage-target) - * [`unmanaged`](#unmanaged) - * [`update`](#update) - * [`upgrade`](#upgrade) - * [`verify` [*target*...]](#verify-target) -* [Editor configuration](#editor-configuration) -* [pinentry configuration](#pinentry-configuration) - * [Example pinentry configuration](#example-pinentry-configuration) -* [Umask configuration](#umask-configuration) -* [Template execution](#template-execution) -* [Template variables](#template-variables) -* [Template functions](#template-functions) - * [`bitwarden` [*arg*...]](#bitwarden-arg) - * [`bitwardenAttachment` *filename* *itemid*](#bitwardenattachment-filename-itemid) - * [`bitwardenFields` [*arg*...]](#bitwardenfields-arg) - * [`decrypt` *ciphertext*](#decrypt-ciphertext) - * [`encrypt` *plaintext*](#encrypt-plaintext) - * [`exit` *code*](#exit-code) - * [`fromYaml` *yamltext*](#fromyaml-yamltext) - * [`gitHubKeys` *user*](#githubkeys-user) - * [`gitHubLatestRelease` *user-repo*](#githublatestrelease-user-repo) - * [`gopass` *gopass-name*](#gopass-gopass-name) - * [`gopassRaw` *gopass-name*](#gopassraw-gopass-name) - * [`include` *filename*](#include-filename) - * [`ioreg`](#ioreg) - * [`joinPath` *element*...](#joinpath-element) - * [`keepassxc` *entry*](#keepassxc-entry) - * [`keepassxcAttribute` *entry* *attribute*](#keepassxcattribute-entry-attribute) - * [`keyring` *service* *user*](#keyring-service-user) - * [`lastpass` *id*](#lastpass-id) - * [`lastpassRaw` *id*](#lastpassraw-id) - * [`lookPath` *file*](#lookpath-file) - * [`mozillaInstallHash` *path*](#mozillainstallhash-path) - * [`onepassword` *uuid* [*vault-uuid* [*account-name*]]](#onepassword-uuid-vault-uuid-account-name) - * [`onepasswordDocument` *uuid* [*vault-uuid* [*account-name*]]](#onepassworddocument-uuid-vault-uuid-account-name) - * [`onepasswordDetailsFields` *uuid* [*vault-uuid* [*account-name*]]](#onepassworddetailsfields-uuid-vault-uuid-account-name) - * [`onepasswordItemFields` *uuid* [*vault-uuid* [*account-name*]]](#onepassworditemfields-uuid-vault-uuid-account-name) - * [`output` *name* [*arg*...]](#output-name-arg) - * [`pass` *pass-name*](#pass-pass-name) - * [`passFields` *pass-name*](#passfields-pass-name) - * [`passRaw` *pass-name*](#passraw-pass-name) - * [`promptBool` *prompt* [*default*]](#promptbool-prompt-default) - * [`promptInt` *prompt* [*default*]](#promptint-prompt-default) - * [`promptString` *prompt* [*default*]](#promptstring-prompt-default) - * [`secret` [*arg*...]](#secret-arg) - * [`secretJSON` [*arg*...]](#secretjson-arg) - * [`stat` *name*](#stat-name) - * [`stdinIsATTY`](#stdinisatty) - * [`toYaml` *value*](#toyaml-value) - * [`vault` *key*](#vault-key) - * [`writeToStdout` *string*...](#writetostdout-string) - ---- - -## Concepts - -chezmoi evaluates the source state for the current machine and then updates the -destination directory, where: - -* The *source state* declares the desired state of your home directory, - including templates and machine-specific configuration. - -* The *source directory* is where chezmoi stores the source state, by default - `~/.local/share/chezmoi`. - -* The *target state* is the source state computed for the current machine. - -* The *destination directory* is the directory that chezmoi manages, by default - your home directory. - -* A *target* is a file, directory, or symlink in the destination directory. - -* The *destination state* is the current state of all the targets in the - destination directory. - -* The *config file* contains machine-specific configuration, by default it is - `~/.config/chezmoi/chezmoi.toml`. - -* The *working tree* is the git working tree. Normally it is the same as the - source directory, but can be a parent of the source directory. - ---- - -## Global command line flags - -Command line flags override any values set in the configuration file. - -### `--cache` *directory* - -Use *directory* as the cache directory. - -### `--color` *value* - -Colorize diffs, *value* can be `on`, `off`, `auto`, or any boolean-like value -recognized by `parseBool`. The default is `auto` which will colorize diffs only -if the the environment variable `$NO_COLOR` is not set and stdout is a terminal. - -### `-c`, `--config` *filename* - -Read the configuration from *filename*. - -### `--config-format` `json`|`toml`|`yaml` - -Assume the configuration file is in the given format. This is only needed if the -config filename does not have an extension, for example when it is `/dev/stdin`. - -### `-D`, `--destination` *directory* - -Use *directory* as the destination directory. - -### `-n`, `--dry-run` - -Set dry run mode. In dry run mode, the destination directory is never modified. -This is most useful in combination with the `-v` (verbose) flag to print changes -that would be made without making them. - -### `--force` - -Make changes without prompting. - -### `-h`, `--help` - -Print help. - -### `-k`, `--keep-going` - -Keep going as far as possible after a encountering an error. - -### `--no-pager` - -Do not use the pager. - -### `--no-tty` - -Do not attempt to get a TTY to read input and passwords. Instead, read them from -stdin. - -### `-o`, `--output` *filename* - -Write the output to *filename* instead of stdout. - -### `--persistent-state` *filename* - -Read and write the persistent state from *filename*. By default, chezmoi stores -its persistent state in `chezmoistate.boltdb` in the same directory as its -configuration file. - -### `-R`, `--refresh-externals` - -Refresh externals cache. See `.chezmoiexternal.<format>`. - -### `-S`, `--source` *directory* - -Use *directory* as the source directory. - -### `--use-builtin-age` *value* - -Use chezmoi's builtin [age encryption](https://age-encryption.org) instead of an -external `age` command. *value* can be `on`, `off`, `auto`, or any boolean-like -value recognized by `parseBool`. The default is `auto` which will only use the -builtin age if `age.command` cannot be found in `$PATH`. - -The builtin `age` command does not support passphrases, symmetric encryption, or -the use of SSH keys. - -### `--use-builtin-git` *value* - -Use chezmoi's builtin git instead of `git.command` for the `init` and `update` -commands. *value* can be `on`, `off`, `auto`, or any boolean-like value -recognized by `parseBool`. The default is `auto` which will only use the builtin -git if `git.command` cannot be found in `$PATH`. - -### `-v`, `--verbose` - -Set verbose mode. In verbose mode, chezmoi prints the changes that it is making -as approximate shell commands, and any differences in files between the target -state and the destination set are printed as unified diffs. - -### `--version` - -Print the version of chezmoi, the commit at which it was built, and the build -timestamp. - -### `-w`, `--working-tree` *directory* - -Use *directory* as the git working tree directory. By default, chezmoi searches -the source directory and then its ancestors for the first directory that -contains a `.git` directory. - ---- - -## Common command line flags - -The following flags apply to multiple commands where they are relevant. - -### `-f`, `--format` `json`|`yaml` - -Set the output format. - -### `-i`, `--include` *types* - -Only operate on target state entries of type *types*. *types* is a -comma-separated list of target states (`all`, `dirs`, `files`, `remove`, -`scripts`, `symlinks`, and `encrypted`) and can be excluded by preceding them -with a `no`. For example, `--include=dirs,files` will cause the command to apply -to directories and files only. - -#### `--init` - -Regenerate and reread the config file from the config file template before -computing the target state. - -### `-r`, `--recursive` - -Recurse into subdirectories, `true` by default. - -### `-x`, `--exclude` *types* - -Exclude target state entries of type *types*. *types* is a comma-separated list -of target states (`all`, `dirs`, `files`, `remove`, `scripts`, `symlinks`, and -`encrypted`). For example, `--exclude=scripts` will cause the command to not run -scripts and `--exclude=encrypted` will exclude encrypted files. - -## Developer command line flags - -The following flags are global but only relevant for developers and debugging. - -### `--cpu-profile` *filename* - -Write a [Go CPU profile](https://blog.golang.org/pprof) to *filename*. - -### `--debug` - -Log information helpful for debugging. - -### `--gops` - -Enable the [gops](https://github.com/google/gops) agent. - ---- - -## Configuration file - -chezmoi searches for its configuration file according to the [XDG Base Directory -Specification](https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) -and supports [JSON](https://www.json.org/json-en.html), -[TOML](https://github.com/toml-lang/toml), and [YAML](https://yaml.org/). The -basename of the config file is `chezmoi`, and the first config file found is -used. - -In most installations, the config file will be read from -`~/.config/chezmoi/chezmoi.<format>`, where `<format>` is one of `json`, `toml`, -or `yaml`. The config file can be set explicitly with the `--config` command -line option. By default, the format is detected based on the extension of the -config file name, but can be overridden with the `--config-format` command line -option. - -### Variables - -The following configuration variables are available: - -| Section | Variable | Type | Default value | Description | -| -------------- | --------------------- | -------- | ------------------------ | ------------------------------------------------------ | -| Top level | `color` | string | `auto` | Colorize output | -| | `data` | any | *none* | Template data | -| | `destDir` | string | `~` | Destination directory | -| | `encryption` | string | *none* | Encryption tool, either `age` or `gpg` | -| | `format` | string | `json` | Format for data output, either `json` or `yaml` | -| | `mode` | string | `file` | Mode in target dir, either `file` or `symlink` | -| | `sourceDir` | string | `~/.local/share/chezmoi` | Source directory | -| | `pager` | string | `$PAGER` | Default pager | -| | `umask` | int | *from system* | Umask | -| | `useBuiltinAge` | string | `auto` | Use builtin age if `age` command is not found in $PATH | -| | `useBuiltinGit` | string | `auto` | Use builtin git if `git` command is not found in $PATH | -| | `verbose` | bool | `false` | Make output more verbose | -| | `workingTree` | string | *source directory* | git working tree directory | -| `add` | `templateSymlinks` | bool | `false` | Template symlinks to source and home dirs | -| `age` | `args` | []string | *none* | Extra args to age CLI command | -| | `command` | string | `age` | age CLI command | -| | `identity` | string | *none* | age identity file | -| | `identities` | []string | *none* | age identity files | -| | `passphrase` | bool | `false` | Use age passphrase instead of identity | -| | `recipient` | string | *none* | age recipient | -| | `recipients` | []string | *none* | age recipients | -| | `recipientsFile` | []string | *none* | age recipients file | -| | `recipientsFiles` | []string | *none* | age recipients files | -| | `suffix` | string | `.age` | Suffix appended to age-encrypted files | -| | `symmetric` | bool | `false` | Use age symmetric encryption | -| `bitwarden` | `command` | string | `bw` | Bitwarden CLI command | -| `cd` | `args` | []string | *none* | Extra args to shell in `cd` command | -| | `command` | string | *none* | Shell to run in `cd` command | -| `completion` | `custom` | bool | `false` | Enable custom shell completions | -| `diff` | `args` | []string | *see `diff` below* | Extra args to external diff command | -| | `command` | string | *none* | External diff command | -| | `exclude` | []string | *none* | Entry types to exclude from diffs | -| | `pager` | string | *none* | Diff-specific pager | -| `docs` | `maxWidth` | int | 80 | Maximum width of output | -| | `pager` | string | *none* | Docs-specific pager | -| `edit` | `args` | []string | *none* | Extra args to edit command | -| | `command` | string | `$EDITOR` / `$VISUAL` | Edit command | -| | `hardlink` | bool | `true` | Invoke editor with a hardlink to the source file | -| | `minDuration` | duration | `1s` | Minimum duration for edit command | -| `secret` | `command` | string | *none* | Generic secret command | -| `git` | `autoAdd ` | bool | `false` | Add changes to the source state after any change | -| | `autoCommit` | bool | `false` | Commit changes to the source state after any change | -| | `autoPush` | bool | `false` | Push changes to the source state after any change | -| | `command` | string | `git` | Source version control system | -| `gopass` | `command` | string | `gopass` | gopass CLI command | -| `gpg` | `args` | []string | *none* | Extra args to GPG CLI command | -| | `command` | string | `gpg` | GPG CLI command | -| | `recipient` | string | *none* | GPG recipient | -| | `suffix` | string | `.asc` | Suffix appended to GPG-encrypted files | -| | `symmetric` | bool | `false` | Use symmetric GPG encryption | -| `interpreters` | *extension*`.args` | []string | *none* | See section on "Scripts on Windows" | -| | *extension*`.command` | string | *special* | See section on "Scripts on Windows" | -| `keepassxc` | `args` | []string | *none* | Extra args to KeePassXC CLI command | -| | `command` | string | `keepassxc-cli` | KeePassXC CLI command | -| | `database` | string | *none* | KeePassXC database | -| `lastpass` | `command` | string | `lpass` | Lastpass CLI command | -| `merge` | `args` | []string | *see `merge` below* | Args to 3-way merge command | -| | `command` | string | `vimdiff` | 3-way merge command | -| `onepassword` | `cache` | bool | `true` | Enable optional caching provided by `op` | -| | `command` | string | `op` | 1Password CLI command | -| | `prompt` | bool | `true` | Prompt for sign-in when no valid session is available | -| `pass` | `command` | string | `pass` | Pass CLI command | -| `pinentry` | `args` | []string | *none* | Extra args to the pinentry command | -| | `command` | string | *none* | pinentry command | -| | `options` | []string | *see `pinentry` below* | Extra options for pinentry | -| `template` | `options` | []string | `["missingkey=error"]` | Template options | -| `vault` | `command` | string | `vault` | Vault CLI command | - -### Examples - -#### JSON - -```json -{ - "sourceDir": "/home/user/.dotfiles", - "git": { - "autoPush": true - } -} -``` - -#### TOML - -```toml -sourceDir = "/home/user/.dotfiles" -[git] - autoPush = true -``` - -#### YAML - -```yaml -sourceDir: /home/user/.dotfiles -git: - autoPush: true -``` - ---- - -## Source state attributes - -chezmoi stores the source state of files, symbolic links, and directories in -regular files and directories in the source directory (`~/.local/share/chezmoi` -by default). This location can be overridden with the `-S` flag or by giving a -value for `sourceDir` in `~/.config/chezmoi/chezmoi.toml`. Directory targets are -represented as directories in the source state. All other target types are -represented as files in the source state. Some state is encoded in the source -names. - -The following prefixes and suffixes are special, and are collectively referred -to as "attributes": - -| Prefix | Effect | -| ------------- | ------------------------------------------------------------------------------ | -| `after_` | Run script after updating the destination | -| `before_` | Run script before updating the destination | -| `create_` | Ensure that the file exists, and create it with contents if it does not | -| `dot_` | Rename to use a leading dot, e.g. `dot_foo` becomes `.foo` | -| `empty_` | Ensure the file exists, even if is empty. By default, empty files are removed | -| `encrypted_` | Encrypt the file in the source state | -| `exact_` | Remove anything not managed by chezmoi | -| `executable_` | Add executable permissions to the target file | -| `literal_` | Stop parsing prefix attributes | -| `modify_` | Treat the contents as a script that modifies an existing file | -| `once_` | Only run the script if it has not been run before | -| `onchange_` | Only run the script if its contents have changed from the last time it was run | -| `private_` | Remove all group and world permissions from the target file or directory | -| `readonly_` | Remove all write permissions from the target file or directory | -| `remove_` | Remove the entry if it exists | -| `run_` | Treat the contents as a script to run | -| `symlink_` | Create a symlink instead of a regular file | - -| Suffix | Effect | -| ---------- | --------------------------------------------------- | -| `.literal` | Stop parsing suffix attributes | -| `.tmpl` | Treat the contents of the source file as a template | - -Different target types allow different prefixes and suffixes. The order of -prefixes is important. - -| Target type | Source type | Allowed prefixes in order | Allowed suffixes | -| ------------- | ----------- | ----------------------------------------------------------------------- | ---------------- | -| Directory | Directory | `exact_`, `private_`, `readonly_`, `dot_` | *none* | -| Regular file | File | `encrypted_`, `private_`, `executable_`, `dot_` | `.tmpl` | -| Create file | File | `create_`, `encrypted_`, `private_`, `readonly_`, `executable_`, `dot_` | `.tmpl` | -| Modify file | File | `modify_`, `encrypted_`, `private_`, `readonly_`, `executable_`, `dot_` | `.tmpl` | -| Remove | File | `remove_`, `dot_` | *none* | -| Script | File | `run_`, `once_` or `onchange_`, `before_` or `after_` | `.tmpl` | -| Symbolic link | File | `symlink_`, `dot_` | `.tmpl` | - -The `literal_` prefix and `.literal` suffix can appear anywhere and stop -attribute parsing. This permits filenames that would otherwise conflict with -chezmoi's attributes to be represented. - -In addition, if the source file is encrypted, the suffix `.age` (when age -encryption is used) or `.asc` (when gpg encryption is used) is stripped. These -suffixes can be overridden with the `age.suffix` and `gpg.suffix` configuration -variables. - -chezmoi ignores all files and directories in the source directory that begin -with a `.` with the exception of files and directories that begin with -`.chezmoi`. - ---- - -## Target types - -chezmoi will create, update, and delete files, directories, and symbolic links -in the destination directory, and run scripts. chezmoi deterministically -performs actions in ASCII order of their target name. For example, given a file -`dot_a`, a script `run_z`, and a directory `exact_dot_c`, chezmoi will first -create `.a`, create `.c`, and then execute `run_z`. - ---- - -### Files - -Files are represented by regular files in the source state. The `encrypted_` -attribute determines whether the file in the source state is encrypted. The -`executable_` attribute will set the executable bits in the the target state, -and the `private_` attribute will clear all group and world permissions. The -`readonly_` attribute will clear all write permission bits in the target state. -Files with the `.tmpl` suffix will be interpreted as templates. If the target -contents are empty then the file will be removed, unless it has an `empty_` -prefix. - -#### Create file - -Files with the `create_` prefix will be created in the target state with the -contents of the file in the source state if they do not already exist. If the -file in the destination state already exists then its contents will be left -unchanged. - -#### Modify file - -Files with the `modify_` prefix are treated as scripts that modify an existing -file. The contents of the existing file (which maybe empty if the existing file -does not exist or is empty) are passed to the script's standard input, and the -new contents are read from the scripts standard output. - ---- - -#### Remove entry - -Files with the `remove_` prefix will cause the corresponding entry (file, -directory, or symlink) to be removed in the target state. - ---- - -### Directories - -Directories are represented by regular directories in the source state. The -`exact_` attribute causes chezmoi to remove any entries in the target state that -are not explicitly specified in the source state, and the `private_` attribute -causes chezmoi to clear all group and world permissions. The `readonly_` -attribute will clear all write permission bits. - ---- - -### Symbolic links - -Symbolic links are represented by regular files in the source state with the -prefix `symlink_`. The contents of the file will have a trailing newline -stripped, and the result be interpreted as the target of the symbolic link. -Symbolic links with the `.tmpl` suffix in the source state are interpreted as -templates. If the target of the symbolic link is empty or consists only of -whitespace, then the target is removed. - ---- - -### Scripts - -Scripts are represented as regular files in the source state with prefix `run_`. -The file's contents (after being interpreted as a template if it has a `.tmpl` -suffix) are executed. - -Scripts are executed on every `chezmoi apply`, unless they have the `once_` or -`onchange_` attribute. `run_once_` scripts are only executed if a script with -the same contents has not been run before, for example if its contents has -changed. `run_onchange_` scripts are executed whenever their contents change, -even if a script with the same contents has run before. - -Scripts with the `before_` attribute are executed before any files, directories, -or symlinks are updated. Scripts with the `after_` attribute are executed after -all files, directories, and symlinks have been updated. Scripts without an -`before_` or `after_` attribute are executed in ASCII order of their target -names with respect to files, directories, and symlinks. - -Scripts will normally run with their working directory set to their equivalent -location in the destination directory. For example, a script in -`~/.local/share/chezmoi/dir/run_script` will be run with a working directory of -`~/dir`. If the equivalent location in the destination directory either does not -exist or is not a directory, then chezmoi will walk up the script's directory -hierarchy and run the script in the first directory that exists and is a -directory. - -#### Scripts on Windows - -<!-- FIXME: some of the following needs to be moved to the how-to --> - -The execution of scripts on Windows depends on the script's file extension. -Windows will natively execute scripts with a `.bat`, `.cmd`, `.com`, and `.exe` -extensions. Other extensions require an interpreter, which must be in your -`%PATH%`. - -The default script interpreters are: - -| Extension | Command | Arguments | -| --------- | ------------ | --------- | -| `.pl` | `perl` | *none* | -| `.py` | `python` | *none* | -| `.ps1` | `powershell` | `-NoLogo` | -| `.rb` | `ruby` | *none* | - -Script interpreters can be added or overridden with the -`interpreters.`*extension* section in the configuration file. Note that the -leading `.` is dropped from *extension*. - -For example to change the Python interpreter to `C:\Python39\python.exe` and add -a Tcl/Tk interpreter, include the following in `~/.config/chezmoi/chezmoi.toml`: - -```toml -[interpreters.py] - command = 'C:\Python39\python.exe' -[interpreters.tcl] - command = "tclsh" -``` - -If the script in the source state is a template (with a `.tmpl` extension), then -chezmoi will strip the `.tmpl` extension and use the next remaining extension to -determine the interpreter to use. - ---- - -### `symlink` mode - -By default, chezmoi will create regular files and directories. Setting `mode = -"symlink"` will make chezmoi behave more like a dotfile manager that uses -symlinks by default, i.e. `chezmoi apply` will make dotfiles symlinks to files -in the source directory if the target is a regular file and is not -encrypted, executable, private, or a template. - ---- - -## Application order - -chezmoi is deterministic in its order of application. The order is: - -1. Read the source state. -2. Read the destination state. -3. Compute the target state. -4. Run `run_before_` scripts in alphabetical order. -5. Update entries in the target state (files, directories, scripts, symlinks, - etc.) in alphabetical order of their target name. -6. Run `run_after_` scripts in alphabetical order. - -Target names are considered after all attributes are stripped. For example, -given `create_alpha` and `modify_dot_beta` in the source state, `.beta` will be -updated before `alpha` because `.beta` sorts before `alpha`. - -chezmoi assumes that the source or destination states are not modified while -chezmoi is being executed. This assumption permits significant performance -improvements, for example allowing chezmoi to only read files from the source -and destination states if they are needed to compute the target state. - -chezmoi's behavior when the above assumptions are violated is undefined. For -example, using a `run_before_` script to update files in the source or -destination states violates the assumption that the source and destination -states do not change while chezmoi is running. - ---- - -## Special files and directories - -All files and directories in the source state whose name begins with `.` are -ignored by default, unless they are one of the special files listed here. -`.chezmoidata.<format>` and `.chezmoitemplates` are read before all other files -so that they can be used in templates. - ---- - -### `.chezmoi.<format>.tmpl` - -If a file called `.chezmoi.<format>.tmpl` exists then `chezmoi init` will use it -to create an initial config file. `<format>` must be one of the the supported -config file formats, e.g. `json`, `toml`, or `yaml`. - -#### `.chezmoi.<format>.tmpl` examples - -``` -{{ $email := promptString "email" -}} -data: - email: {{ $email | quote }} -``` - ---- - -### `.chezmoidata.<format>` - -If a file called `.chezmoidata.<format>` exists in the source state, it is interpreted -as a datasource available in most [templates](TEMPLATING.md#template-data). - -#### `.chezmoidata.<format>` examples - -If `.chezmoidata.toml` contains the following (and no variable is overwritten in later stages): - -```toml -editor = "nvim" -[directions] - up = "k" - down = "j" - right = "l" - left = "h" -``` - -Then the following template: - -``` -EDITOR={{ .editor }} -MOVE_UP={{ .directions.up }} -MOVE_DOWN={{ .directions.down }} -MOVE_RIGHT={{ .directions.right }} -MOVE_LEFT={{ .directions.left }} -``` - -Will result in: - -``` -EDITOR=nvim -MOVE_UP=k -MOVE_DOWN=j -MOVE_RIGHT=l -MOVE_LEFT=h -``` - ---- - -### `.chezmoiexternal.<format>` - -If a file called `.chezmoiexternal.<format>` exists in the source state, it is -interpreted as a list of external files and archives to be included as if they -were in the source state. - -`<format>` must be one of chezmoi's supported configuration file formats, e.g. -`json`, `toml`, or `yaml`. - -`.chezmoiexternal.<format>` is interpreted as a template. This allows different -externals to be included on different machines. - -Entries are indexed by target name relative to the directory of the -`.chezmoiexternal.<format>` file, and must have a `type` and a `url` field. -`type` can be either `file` or `archive`. If the entry's parent directories do -not already exist in the source state then chezmoi will create them as regular -directories. - -Entries may have the following fields: - -| Variable | Type | Default value | Description | -| ----------------- | -------- | ------------- | ------------------------------------------------------------- | -| `type` | string | *none* | External type (`file` or `archive`) | -| `encrypted` | bool | `false` | Whether the external is encrypted | -| `exact` | bool | `false` | Add `exact_` attribute to directories in archive | -| `executable` | bool | `false` | Add `executable_` attribute to file | -| `filter.command` | string | *none* | Command to filter contents | -| `filter.args` | []string | *none* | Extra args to command to filter contents | -| `format` | string | *autodetect* | Format of archive | -| `refreshPeriod` | duration | `0` | Refresh period | -| `stripComponents` | int | `0` | Number of leading directory components to strip from archives | -| `url` | string | *none* | URL | - -The optional boolean `encrypted` field specifies whether the file or archive -is encrypted. - -If optional string `filter.command` and array of strings `filter.args` are -specified, the the file or archive is filtered by piping it into the command's -standard input and reading the command's standard output. - -If `type` is `file` then the target is a file with the contents of `url`. The -optional boolean field `executable` may be set, in which case the target file -will be executable. - -If `type` is `archive` then the target is a directory with the contents of the -archive at `url`. The optional boolean field `exact` may be set, in which case -the directory and all subdirectories will be treated as exact directories, i.e. -`chezmoi apply` will remove entries not present in the archive. The optional -integer field `stripComponents` will remove leading path components from the -members of archive. The optional string field `format` sets the archive format. -The supported archive formats are `tar`, `tar.gz`, `tgz`, `tar.bz2`, `tbz2`, and -`zip`. If `format` is not specified then chezmoi will guess the format using -firstly the path of the URL and secondly its contents. - -By default, chezmoi will cache downloaded URLs. The optional duration -`refreshPeriod` field specifies how often chezmoi will re-download the URL. The -default is zero meaning that chezmoi will never re-download unless forced. To -force chezmoi to re-download URLs, pass the `-R`/`--refresh-externals` flag. -Suitable refresh periods include one day (`24h`), one week (`168h`), or four -weeks (`672h`). - -#### `.chezmoiexternal.<format>` examples - -```toml -[".vim/autoload/plug.vim"] - type = "file" - url = "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" - refreshPeriod = "168h" -[".oh-my-zsh"] - type = "archive" - url = "https://github.com/ohmyzsh/ohmyzsh/archive/master.tar.gz" - exact = true - stripComponents = 1 - refreshPeriod = "168h" -[".oh-my-zsh/custom/plugins/zsh-syntax-highlighting"] - type = "archive" - url = "https://github.com/zsh-users/zsh-syntax-highlighting/archive/master.tar.gz" - exact = true - stripComponents = 1 - refreshPeriod = "168h" -[".oh-my-zsh/custom/themes/powerlevel10k"] - type = "archive" - url = "https://github.com/romkatv/powerlevel10k/archive/v1.15.0.tar.gz" - exact = true - stripComponents = 1 -``` - ---- - -### `.chezmoiignore` - -If a file called `.chezmoiignore` exists in the source state then it is -interpreted as a set of patterns to ignore. Patterns are matched using -[`doublestar.Match`](https://pkg.go.dev/github.com/bmatcuk/doublestar/v4#Match) -and match against the target path, not the source path. - -Patterns can be excluded by prefixing them with a `!` character. All excludes -take priority over all includes. - -Comments are introduced with the `#` character and run until the end of the -line. - -`.chezmoiignore` is interpreted as a template. This allows different files to be -ignored on different machines. - -`.chezmoiignore` files in subdirectories apply only to that subdirectory. - -#### `.chezmoiignore` examples - -``` -README.md - -*.txt # ignore *.txt in the target directory -*/*.txt # ignore *.txt in subdirectories of the target directory - # but not in subdirectories of subdirectories; - # so a/b/c.txt would *not* be ignored - -backups/ # ignore backups folder in chezmoi directory and all its contents -backups/** # ignore all contents of backups folder in chezmoi directory - # but not backups folder itself - -{{- if ne .email "[email protected]" }} -# Ignore .company-directory unless configured with a company email -.company-directory # note that the pattern is not dot_company-directory -{{- end }} - -{{- if ne .email "[email protected] }} -.personal-file -{{- end }} -``` - ---- - -### `.chezmoiremove` - -If a file called `.chezmoiremove` exists in the source state then it is -interpreted as a list of targets to remove. `.chezmoiremove` is interpreted as a -template. - ---- - -### `.chezmoiroot` - -If a file called `.chezmoiroot` exists in the root of the source directory then -the source state is read from the directory specified in `.chezmoiroot` -interpreted as a relative path to the source directory. `.chezmoiroot` is read -before all other files in the source directory. - ---- - -### `.chezmoiscripts` - -If a directory called `.chezmoiscripts` exists in the root of the source -directory then any scripts in it are executed as normal scripts without creating -a corresponding directory in the target state. - ---- - -### `.chezmoitemplates` - -If a directory called `.chezmoitemplates` exists, then all files in this -directory are parsed as templates are available as templates with a name equal -to the relative path to the `.chezmoitemplates` directory. - -The [`template` action](https://pkg.go.dev/text/template#hdr-Actions) can be -used to include these templates in another template. The value of `.` must be -set explicitly if needed, otherwise the template will be executed with `nil` -data. - -#### `.chezmoitemplates` examples - -Given: - -`.chezmoitemplates/foo`: -``` -{{ if true }}bar{{ end }} -``` - -`dot_config.tmpl`: -``` -{{ template "foo" . }} -``` - -The target state of `.config` will be `bar`. - ---- - -### `.chezmoiversion` - -If a file called `.chezmoiversion` exists, then its contents are interpreted as -a semantic version defining the minimum version of chezmoi required to interpret -the source state correctly. chezmoi will refuse to interpret the source state if -the current version is too old. - -#### `.chezmoiversion` examples - -``` -1.5.0 -``` - ---- - -## Commands - ---- - -### `add` *target*... - -Add *target*s to the source state. If any target is already in the source state, -then its source state is replaced with its current state in the destination -directory. - -#### `--autotemplate` - -Automatically generate a template by replacing strings with variable names from -the `data` section of the config file. Longer substitutions occur before shorter -ones. This implies the `--template` option. - -#### `-e`, `--empty` - -Set the `empty` attribute on added files. - -#### `--encrypt` - -Encrypt files using the defined encryption method. - -#### `-f`, `--force` - -Add *target*s, even if doing so would cause a source template to be overwritten. - -#### `--follow` - -If the last part of a target is a symlink, add the target of the symlink instead -of the symlink itself. - -#### `--exact` - -Set the `exact` attribute on added directories. - -#### `-i`, `--include` *types* - -Only add entries of type *types*. - -#### `-p`, `--prompt` - -Interactively prompt before adding each file. - -#### `-r`, `--recursive` - -Recursively add all files, directories, and symlinks. - -#### `-T`, `--template` - -Set the `template` attribute on added files and symlinks. - -#### `--template-symlinks` - -When adding symlink to an absolute path in the source directory or destination -directory, create a symlink template with `.chezmoi.sourceDir` or -`.chezmoi.homeDir`. This is useful for creating portable absolute symlinks. - -#### `add` examples - -```console -$ chezmoi add ~/.bashrc -$ chezmoi add ~/.gitconfig --template -$ chezmoi add ~/.ssh/id_rsa --encrypt -$ chezmoi add ~/.vim --recursive -$ chezmoi add ~/.oh-my-zsh --exact --recursive -``` - ---- - -### `apply` [*target*...] - -Ensure that *target*... are in the target state, updating them if necessary. If -no targets are specified, the state of all targets are ensured. If a target has -been modified since chezmoi last wrote it then the user will be prompted if they -want to overwrite the file. - -#### `-i`, `--include` *types* - -Only add entries of type *types*. - -#### `--source-path` - -Specify targets by source path, rather than target path. This is useful for -applying changes after editing. - -#### `apply` examples - -```console -$ chezmoi apply -$ chezmoi apply --dry-run --verbose -$ chezmoi apply ~/.bashrc -``` - ---- - -### `archive` [*target*....] - -Generate an archive of the target state, or only the targets specified. This can -be piped into `tar` to inspect the target state. - -#### `-f`, `--format` `tar`|`tar.gz`|`tgz`|`zip` - -Write the archive in *format*. If `--output` is set the format is guessed from -the extension, otherwise the default is `tar`. - -#### `-i`, `--include` *types* - -Only include entries of type *types*. - -#### `-z`, `--gzip` - -Compress the archive with gzip. This is automatically set if the format is -`tar.gz` or `tgz` and is ignored if the format is `zip`. - -#### `archive` examples - -```console -$ chezmoi archive | tar tvf - -$ chezmoi archive --output=dotfiles.tar.gz -$ chezmoi archive --output=dotfiles.zip -``` - ---- - -### `cat` *target*... - -Write the target contents of *target*s to stdout. *target*s must be files, -scripts, or symlinks. For files, the target file contents are written. For -scripts, the script's contents are written. For symlinks, the target target is -written. - -#### `cat` examples - -```console -$ chezmoi cat ~/.bashrc -``` - ---- - -### `cd` - -Launch a shell in the working tree (typically the source directory). chezmoi -will launch the command set by the `cd.command` configuration variable with any -extra arguments specified by `cd.args`. If this is not set, chezmoi will attempt -to detect your shell and will finally fall back to an OS-specific default. - -This does not change the current directory of the current shell. To do that, -instead use: - -```console -$ cd $(chezmoi source-path) -``` - -#### `cd` examples - -```console -$ chezmoi cd -``` - ---- - -### `chattr` *modifier* *target*... - -Change the attributes and/or type of *target*s. *modifier* specifies what to -modify. - -Add attributes by specifying them or their abbreviations directly, optionally -prefixed with a plus sign (`+`). Remove attributes by prefixing them or their -attributes with the string `no` or a minus sign (`-`). The available attribute -modifiers and their abbreviations are: - -| Attribute modifier | Abbreviation | -| ------------------ | ------------ | -| `after` | `a` | -| `before` | `b` | -| `empty` | `e` | -| `encrypted` | *none* | -| `exact` | *none* | -| `executable` | `x` | -| `once` | `o` | -| `private` | `p` | -| `readonly` | `r` | -| `template` | `t` | - -The type of a target can be changed using a type modifier: - -| Type modifier | -| ------------- | -| `create` | -| `modify` | -| `script` | -| `symlink` | - -The negative form of type modifiers, e.g. `nocreate`, changes the target to be a -regular file if it is of that type, otherwise the type is left unchanged. - -Multiple modifications may be specified by separating them with a comma (`,`). -If you use the `-`*modifier* form then you must put *modifier* after a `--` to -prevent chezmoi from interpreting `-`*modifier* as an option. - -#### `chattr` examples - -```console -$ chezmoi chattr template ~/.bashrc -$ chezmoi chattr noempty ~/.profile -$ chezmoi chattr private,template ~/.netrc -$ chezmoi chattr -- -x ~/.zshrc -$ chezmoi chattr +create,+private ~/.kube/config -``` - ---- - -### `completion` *shell* - -Generate shell completion code for the specified shell (`bash`, `fish`, -`powershell`, or `zsh`). - -#### `completion` examples - -```console -$ chezmoi completion bash -$ chezmoi completion fish --output=~/.config/fish/completions/chezmoi.fish -``` - ---- - -### `data` - -Write the computed template data to stdout. - -#### `-f`, `--format` `json`|`yaml` - -Set the output format. - -#### `data` examples - -```console -$ chezmoi data -$ chezmoi data --format=yaml -``` - ---- - -### `decrypt` [*file*...] - -Decrypt *file*s using chezmoi's configured encryption. If no files are given, -decrypt the standard input. The decrypted result is written to the standard -output or a file if the `--output` flag is set. - ---- - -### `diff` [*target*...] - -Print the difference between the target state and the destination state for -*target*s. If no targets are specified, print the differences for all targets. - -If a `diff.pager` command is set in the configuration file then the output will -be piped into it. - -If `diff.command` is set then it will be invoked to show individual file -differences with `diff.args` passed as arguments. Each element of `diff.args` is -interpreted as a template with the variables `.Destination` and `.Target` -available corresponding to the path of the file in the source and target state -respectively. The default value of `diff.args` is `["{{ .Destination }}", "{{ -.Target }}"]`. If `diff.args` does not contain any template arguments then `{{ -.Destination }}` and `{{ .Target }}` will be appended automatically. - -#### `--reverse` - -Reverse the direction of the diff, i.e. show the changes to the target required -to match the destination. - -#### `--pager` *pager* - -Pager to use for output. - -#### `--use-builtin-diff` - -Use chezmoi's builtin diff, even if the `diff.command` configuration variable is -set. - -#### `diff` examples - -```console -$ chezmoi diff -$ chezmoi diff ~/.bashrc -``` - ---- - -### `docs` [*regexp*] - -Print the documentation page matching the regular expression *regexp*. Matching -is case insensitive. If no pattern is given, print `REFERENCE.md`. - -#### `--pager` *pager* - -Pager to use for output. - -#### `docs` examples - -```console -$ chezmoi docs -$ chezmoi docs faq -$ chezmoi docs howto -``` - ---- - -### `doctor` - -Check for potential problems. - -#### `doctor` examples - -```console -$ chezmoi doctor -``` - ---- - -### `dump` [*target*...] - -Dump the target state of *target*s. If no targets are specified, then the entire -target state. - -#### `-f`, `--format` `json`|`yaml` - -Set the output format. - -#### `-i`, `--include` *types* - -Only include entries of type *types*. - -#### `dump` examples - -```console -$ chezmoi dump ~/.bashrc -$ chezmoi dump --format=yaml -``` - ---- - -### `edit` [*target*...] - -Edit the source state of *target*s, which must be files or symlinks. If no -targets are given then the working tree of the source directory is opened. - -The editor used is the first non-empty string of the `edit.command` -configuration variable, the `$VISUAL` environment variable, the `$EDITOR` -environment variable. If none are set then chezmoi falls back to `notepad.exe` -on Windows systems and `vi` on non-Windows systems. - -When the `edit.command` configuration variable is used, extra arguments can be -passed to the editor with the `editor.args` configuration variable. - -Encrypted files are decrypted to a private temporary directory and the editor is -invoked with the decrypted file. When the editor exits the edited decrypted file -is re-encrypted and replaces the original file in the source state. - -If the operating system supports hard links, then the edit command invokes the -editor with filenames which match the target filename, unless the -`edit.hardlink` configuration variable is set to `false` the `--hardlink=false` -command line flag is set. - -chezmoi will emit a warning if the editor returns in less than -`edit.minDuration` (default `1s`). To disable this warning, set -`edit.minDuration` to `0`. - -#### `-a`, `--apply` - -Apply target immediately after editing. Ignored if there are no targets. - -#### `--hardlink` *bool* - -Invoke the editor with a hard link to the source file with a name matching the -target filename. This can help the editor determine the type of the file -correctly. This is the default. - -#### `edit` examples - -```console -$ chezmoi edit ~/.bashrc -$ chezmoi edit ~/.bashrc --apply -$ chezmoi edit -``` - ---- - -### `edit-config` - -Edit the configuration file. - -#### `edit-config` examples - -```console -$ chezmoi edit-config -``` - ---- - -### `encrypt` [*file*...] - -Encrypt *file*s using chezmoi's configured encryption. If no files are given, -encrypt the standard input. The encrypted result is written to the standard -output or a file if the `--output` flag is set. - ---- - -### `execute-template` [*template*...] - -Execute *template*s. This is useful for testing templates or for calling chezmoi -from other scripts. *templates* are interpreted as literal templates, with no -whitespace added to the output between arguments. If no templates are specified, -the template is read from stdin. - -#### `--init`, `-i` - -Include simulated functions only available during `chezmoi init`. - -#### `--promptBool` *pairs* - -Simulate the `promptBool` function with a function that returns values from -*pairs*. *pairs* is a comma-separated list of *prompt*`=`*value* pairs. If -`promptBool` is called with a *prompt* that does not match any of *pairs*, then -it returns false. - -#### `--promptInt` *pairs* - -Simulate the `promptInt` function with a function that returns values from -*pairs*. *pairs* is a comma-separated list of *prompt*`=`*value* pairs. If -`promptInt` is called with a *prompt* that does not match any of *pairs*, then -it returns zero. - -#### `--promptString`, `-p` *pairs* - -Simulate the `promptString` function with a function that returns values from -*pairs*. *pairs* is a comma-separated list of *prompt*`=`*value* pairs. If -`promptString` is called with a *prompt* that does not match any of *pairs*, -then it returns *prompt* unchanged. - -#### `--stdinisatty` *bool* - -Simulate the `stdinIsATTY` function by returning *bool*. - -#### `execute-template` examples - -```console -$ chezmoi execute-template '{{ .chezmoi.sourceDir }}' -$ chezmoi execute-template '{{ .chezmoi.os }}' / '{{ .chezmoi.arch }}' -$ echo '{{ .chezmoi | toJson }}' | chezmoi execute-template -$ chezmoi execute-template --init --promptString [email protected] < ~/.local/share/chezmoi/.chezmoi.toml.tmpl -``` - ---- - -### `forget` *target*... - -Remove *target*s from the source state, i.e. stop managing them. - -#### `forget` examples - -```console -$ chezmoi forget ~/.bashrc -``` - ---- - -### `git` [*arg*...] - -Run `git` *arg*s in the working tree (typically the source directory). Note that -flags in *arguments* must occur after `--` to prevent chezmoi from interpreting -them. - -#### `git` examples - -```console -$ chezmoi git add . -$ chezmoi git add dot_gitconfig -$ chezmoi git -- commit -m "Add .gitconfig" -``` - ---- - -### `help` [*command*...] - -Print the help associated with *command*, or general help if no command is -given. - ---- - -### `init` [*repo*] - -Setup the source directory, generate the config file, and optionally update the -destination directory to match the target state. *repo* is expanded to a full -git repo URL, using HTTPS by default, or SSH if the `--ssh` option is specified, -according to the following patterns: - -| Pattern | HTTPS Repo | SSH repo | -| ------------------ | -------------------------------------- | ---------------------------------- | -| `user` | `https://github.com/user/dotfiles.git` | `[email protected]:user/dotfiles.git` | -| `user/repo` | `https://github.com/user/repo.git` | `[email protected]:user/repo.git` | -| `site/user/repo` | `https://site/user/repo.git` | `git@site:user/repo.git` | -| `~sr.ht/user` | `https://git.sr.ht/~user/dotfiles` | `[email protected]:~user/dotfiles.git` | -| `~sr.ht/user/repo` | `https://git.sr.ht/~user/repo` | `[email protected]:~/user/repo.git` | - -First, if the source directory is not already contain a repository, then if -*repo* is given it is checked out into the source directory, otherwise a new -repository is initialized in the source directory. - -Second, if a file called `.chezmoi.<format>.tmpl` exists, where `<format>` is -one of the supported file formats (e.g. `json`, `toml`, or `yaml`) then a new -configuration file is created using that file as a template. - -Then, if the `--apply` flag is passed, `chezmoi apply` is run. - -Then, if the `--purge` flag is passed, chezmoi will remove its source, config, -and cache directories. - -Finally, if the `--purge-binary` is passed, chezmoi will attempt to remove its -own binary. - -#### `--apply` - -Run `chezmoi apply` after checking out the repo and creating the config file. - -#### `--branch` *branch* - -Check out *branch* instead of the default branch. - -#### `--config-path` *path* - -Write the generated config file to *path* instead of the default location. - -#### `--data` *bool* - -Include existing template data when creating the config file. This defaults to -`true`. Set this to `false` to simulate creating the config file with no -existing template data. - -#### `--depth` *depth* - -Clone the repo with depth *depth*. - -#### `--one-shot` - -`--one-shot` is the equivalent of `--apply`, `--depth=1`, `--force`, `--purge`, -and `--purge-binary`. It attempts to install your dotfiles with chezmoi and then -remove all traces of chezmoi from the system. This is useful for setting up -temporary environments (e.g. Docker containers). - -#### `--purge` - -Remove the source and config directories after applying. - -#### `--purge-binary` - -Attempt to remove the chezmoi binary after applying. - -#### `--ssh` - -Guess an SSH repo URL instead of an HTTPS repo. - -#### `init` examples - -```console -$ chezmoi init user -$ chezmoi init user --apply -$ chezmoi init user --apply --purge -$ chezmoi init user/dots -$ chezmoi init gitlab.com/user -``` - ---- - -### `import` *filename* - -Import the source state from an archive file in to a directory in the source -state. This is primarily used to make subdirectories of your home directory -exactly match the contents of a downloaded archive. You will generally always -want to set the `--destination`, `--exact`, and `--remove-destination` flags. - -The supported archive formats are `tar`, `tar.gz`, `tgz`, `tar.bz2`, `tbz2`, and -`zip`. - -#### `--destination` *directory* - -Set the destination (in the source state) where the archive will be imported. - -#### `--exact` - -Set the `exact` attribute on all imported directories. - -#### `-r`, `--remove-destination` - -Remove destination (in the source state) before importing. - -#### `--strip-components` *n* - -Strip *n* leading components from paths. - -#### `import` examples - -```console -$ curl -s -L -o ${TMPDIR}/oh-my-zsh-master.tar.gz https://github.com/ohmyzsh/ohmyzsh/archive/master.tar.gz -$ mkdir -p $(chezmoi source-path)/dot_oh-my-zsh -$ chezmoi import --strip-components 1 --destination ~/.oh-my-zsh ${TMPDIR}/oh-my-zsh-master.tar.gz -``` - -### `list` - -`list` is an alias for `managed`. - ---- - -### `manage` *target*... - -`manage` is an alias for `add` for symmetry with `unmanage`. - ---- - -### `managed` - -List all managed entries in the destination directory in alphabetical order. - -#### `-i`, `--include` *types* - -Only include entries of type *types*. - -#### `managed` examples - -```console -$ chezmoi managed -$ chezmoi managed --include=files -$ chezmoi managed --include=files,symlinks -$ chezmoi managed -i dirs -$ chezmoi managed -i dirs,files -``` - ---- - -### `merge` *target*... - -Perform a three-way merge between the destination state, the target state, and -the source state for each *target*. The merge tool is defined by the -`merge.command` configuration variable, and defaults to `vimdiff`. If multiple -targets are specified the merge tool is invoked separately and sequentially for -each target. If the target state cannot be computed (for example if source is a -template containing errors or an encrypted file that cannot be decrypted) a -two-way merge is performed instead. - -The order of arguments to `merge.command` is set by `merge.args`. Each argument -is interpreted as a template with the variables `.Destination`, `.Source`, and -`.Target` available corresponding to the path of the file in the destination -state, the source state, and the target state respectively. The default value of -`merge.args` is `["{{ .Destination }}", "{{ .Source }}", "{{ .Target }}"]`. If -`merge.args` does not contain any template arguments then `{{ .Destination }}`, -`{{ .Source }}`, and `{{ .Target }}` will be appended automatically. - -#### `merge` examples - -```console -$ chezmoi merge ~/.bashrc -``` - ---- - -### `merge-all` - -Perform a three-way merge for file whose actual state does not match its target -state. The merge is performed with `chezmoi merge`. - -#### `merge-all` examples - -```console -$ chezmoi merge-all -``` - ---- - -### `purge` - -Remove chezmoi's configuration, state, and source directory, but leave the -target state intact. - -#### `-f`, `--force` - -Remove without prompting. - -#### `purge` examples - -```console -$ chezmoi purge -$ chezmoi purge --force -``` - ---- - -### `remove` *target*... - -Remove *target*s from both the source state and the destination directory. - -#### `-f`, `--force` - -Remove without prompting. - ---- - -### `re-add` - -Re-add all modified files in the target state. chezmoi will not overwrite -templates, and all entries that are not files are ignored. - -#### `re-add` examples - -```console -$ chezmoi re-add -``` - ---- - -### `rm` *target*... - -`rm` is an alias for `remove`. - ---- - -### `secret` - -Run a secret manager's CLI, passing any extra arguments to the secret manager's -CLI. This is primarily for verifying chezmoi's integration with your secret -manager. Normally you would use template functions to retrieve secrets. Note -that if you want to pass flags to the secret manager's CLI you will need to -separate them with `--` to prevent chezmoi from interpreting them. - -To get a full list of available commands run: - -```console -$ chezmoi secret help -``` - -#### `secret` examples - -```console -$ chezmoi secret keyring set --service=service --user=user --value=password -$ chezmoi secret keyring get --service=service --user=user -$ chezmoi secret keyring delete --service=service --user=user -``` - ---- - -### `source-path` [*target*...] - -Print the path to each target's source state. If no targets are specified then -print the source directory. - -#### `source-path` examples - -```console -$ chezmoi source-path -$ chezmoi source-path ~/.bashrc -``` - ---- - -### `state` - -Manipulate the persistent state. - -#### `state` examples - -```console -$ chezmoi state data -$ chezmoi state delete --bucket=bucket --key=key -$ chezmoi state delete-bucket --bucket=bucket -$ chezmoi state dump -$ chezmoi state get --bucket=bucket --key=key -$ chezmoi state get-bucket --bucket=bucket -$ chezmoi state set --bucket=bucket --key=key --value=value -$ chezmoi state reset -``` - ---- - -### `status` - -Print the status of the files and scripts managed by chezmoi in a format similar -to [`git status`](https://git-scm.com/docs/git-status). - -The first column of output indicates the difference between the last state -written by chezmoi and the actual state. The second column indicates the -difference between the actual state and the target state. - -#### `-i`, `--include` *types* - -Only include entries of type *types*. - -#### `status` examples - -```console -$ chezmoi status -``` - ---- - -### `unmanage` *target*... - -`unmanage` is an alias for `forget` for symmetry with `manage`. - ---- - -### `unmanaged` - -List all unmanaged files in the destination directory. - -#### `unmanaged` examples - -```console -$ chezmoi unmanaged -``` - ---- - -### `update` - -Pull changes from the source repo and apply any changes. - -#### `-i`, `--include` *types* - -Only update entries of type *types*. - -#### `update` examples - -```console -$ chezmoi update -``` - ---- - -### `upgrade` - -Upgrade chezmoi by downloading and installing the latest released version. This -will call the GitHub API to determine if there is a new version of chezmoi -available, and if so, download and attempt to install it in the same way as -chezmoi was previously installed. - -If the any of the `$CHEZMOI_GITHUB_ACCESS_TOKEN`, `$CHEZMOI_GITHUB_TOKEN`, -`$GITHUB_ACCESS_TOKEN`, or `$GITHUB_TOKEN` environment variables are set, then -the first value found will be used to authenticate requests to the GitHub API, -otherwise unauthenticated requests are used which are subject to stricter [rate -limiting](https://developer.github.com/v3/#rate-limiting). Unauthenticated -requests should be sufficient for most cases. - ---- - -### `verify` [*target*...] - -Verify that all *target*s match their target state. chezmoi exits with code 0 -(success) if all targets match their target state, or 1 (failure) otherwise. If -no targets are specified then all targets are checked. - -#### `-i`, `--include` *types* - -Only include entries of type *types*. - -#### `verify` examples - -```console -$ chezmoi verify -$ chezmoi verify ~/.bashrc -``` - ---- - -## Editor configuration - -The `edit` and `edit-config` commands use the editor specified by the `VISUAL` -environment variable, the `$EDITOR` environment variable, or `vi`, whichever is -specified first. - ---- - -## pinentry configuration - -By default, chezmoi will request passwords from the terminal. - -If the `--no-tty` option is passed, then chezmoi will instead read passwords -from the standard input. - -Otherwise, if the configuration variable `pinentry.command` is set then chezmoi -will instead used the given command to read passwords, assuming that it follows -the [Assuan protocol](https://www.gnupg.org/documentation/manuals/assuan.pdf) -like [GnuPG's -pinentry](https://www.gnupg.org/related_software/pinentry/index.html). The -configuration variable `pinentry.args` specifies extra arguments to be passed to -`pinentry.command` and the configuration variable `pinentry.options` specifies -extra options to be set. The default `pinentry.options` is -`["allow-external-password-cache"]`. - -### Example pinentry configuration - -```toml -[pinentry] - command = "pinentry" -``` - ---- - -## Umask configuration - -By default, chezmoi uses your current umask as set by your operating system and -shell. chezmoi only stores crude permissions in its source state, namely in the -`executable` and `private` attributes, corresponding to the umasks of `0o111` -and `0o077` respectively. - -For machine-specific control of umask, set the `umask` configuration variable in -chezmoi's configuration file, for example: - -```toml -umask = 0o22 -``` - ---- - -## Template execution - -chezmoi executes templates using -[`text/template`](https://pkg.go.dev/text/template). The result is treated -differently depending on whether the target is a file or a symlink. - -If target is a file, then: - -* If the result is an empty string, then the file is removed. -* Otherwise, the target file contents are result. - -If the target is a symlink, then: - -* Leading and trailing whitespace are stripped from the result. -* If the result is an empty string, then the symlink is removed. -* Otherwise, the target symlink target is the result. - -chezmoi executes templates using `text/template`'s `missingkey=error` option, -which means that misspelled or missing keys will raise an error. This can be -overridden by setting a list of options in the configuration file, for example: - -```toml -[template] - options = ["missingkey=zero"] -``` - -For a full list of options, see -[`Template.Option`](https://pkg.go.dev/text/template?tab=doc#Template.Option). - ---- - -## Template variables - -chezmoi provides the following automatically-populated variables: - -| Variable | Type | Value | -| -------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | -| `.chezmoi.arch` | string | Architecture, e.g. `amd64`, `arm`, etc. as returned by [runtime.GOARCH](https://pkg.go.dev/runtime?tab=doc#pkg-constants) | -| `.chezmoi.args` | []string | The arguments passed to the `chezmoi` command, starting with the program command | -| `.chezmoi.cacheDir` | string | The cache directory | -| `.chezmoi.configFile` | string | The path to the configuration file used by chezmoi | -| `.chezmoi.executable` | string | The path to the `chezmoi` executable, if available | -| `.chezmoi.fqdnHostname` | string | The fully-qualified domain name hostname of the machine chezmoi is running on | -| `.chezmoi.group` | string | The group of the user running chezmoi | -| `.chezmoi.homeDir` | string | The home directory of the user running chezmoi | -| `.chezmoi.hostname` | string | The hostname of the machine chezmoi is running on, up to the first `.` | -| `.chezmoi.kernel` | string | Contains information from `/proc/sys/kernel`. Linux only, useful for detecting specific kernels (e.g. Microsoft's WSL kernel) | -| `.chezmoi.os` | string | Operating system, e.g. `darwin`, `linux`, etc. as returned by [runtime.GOOS](https://pkg.go.dev/runtime?tab=doc#pkg-constants) | -| `.chezmoi.osRelease` | string | The information from `/etc/os-release`, Linux only, run `chezmoi data` to see its output | -| `.chezmoi.sourceDir` | string | The source directory | -| `.chezmoi.sourceFile` | string | The path of the template relative to the source directory | -| `.chezmoi.username` | string | The username of the user running chezmoi | -| `.chezmoi.version.builtBy` | string | The program that built the `chezmoi` executable, if set | -| `.chezmoi.version.commit` | string | The git commit at which the `chezmoi` executable was built, if set | -| `.chezmoi.version.date` | string | The timestamp at which the `chezmoi` executable was built, if set | -| `.chezmoi.version.version` | string | The version of chezmoi | -| `.chezmoi.workingTree` | string | The working tree of the source directory | - -Additional variables can be defined in the config file in the `data` section. -Variable names must consist of a letter and be followed by zero or more letters -and/or digits. - ---- - -## Template functions - -All standard [`text/template`](https://pkg.go.dev/text/template) and [text -template functions from `sprig`](http://masterminds.github.io/sprig/) are -included. chezmoi provides some additional functions. - ---- - -### `bitwarden` [*arg*...] - -`bitwarden` returns structured data retrieved from -[Bitwarden](https://bitwarden.com) using the [Bitwarden -CLI](https://github.com/bitwarden/cli) (`bw`). *arg*s are passed to `bw get` -unchanged and the output from `bw get` is parsed as JSON. The output from `bw -get` is cached so calling `bitwarden` multiple times with the same arguments -will only invoke `bw` once. - -#### `bitwarden` examples - -``` -username = {{ (bitwarden "item" "<itemid>").login.username }} -password = {{ (bitwarden "item" "<itemid>").login.password }} -``` - ---- - -### `bitwardenAttachment` *filename* *itemid* - -`bitwardenAttachment` returns a document from -[Bitwarden](https://bitwarden.com/) using the [Bitwarden -CLI](https://bitwarden.com/help/article/cli/) (`bw`). *filename* and *itemid* is -passed to `bw get attachment <filename> --itemid <itemid>` and the output from -`bw` is returned. The output from `bw` is cached so calling -`bitwardenAttachment` multiple times with the same *filename* and *itemid* will -only invoke `bw` once. - -#### `bitwardenAttachment` examples - -``` -{{- (bitwardenAttachment "<filename>" "<itemid>") -}} -``` - ---- - -### `bitwardenFields` [*arg*...] - -`bitwardenFields` returns structured data retrieved from -[Bitwarden](https://bitwarden.com) using the [Bitwarden -CLI](https://github.com/bitwarden/cli) (`bw`). *arg*s are passed to `bw get` -unchanged, the output from `bw get` is parsed as JSON, and elements of `fields` -are returned as a map indexed by each field's `name`. For example, given the -output from `bw get`: - -```json -{ - "object": "item", - "id": "bf22e4b4-ae4a-4d1c-8c98-ac620004b628", - "organizationId": null, - "folderId": null, - "type": 1, - "name": "example.com", - "notes": null, - "favorite": false, - "fields": [ - { - "name": "text", - "value": "text-value", - "type": 0 - }, - { - "name": "hidden", - "value": "hidden-value", - "type": 1 - } - ], - "login": { - "username": "username-value", - "password": "password-value", - "totp": null, - "passwordRevisionDate": null - }, - "collectionIds": [], - "revisionDate": "2020-10-28T00:21:02.690Z" -} -``` - -the return value will be the map - -```json -{ - "hidden": { - "name": "hidden", - "type": 1, - "value": "hidden-value" - }, - "token": { - "name": "token", - "type": 0, - "value": "token-value" - } -} -``` - -The output from `bw get` is cached so calling `bitwarden` multiple times with -the same arguments will only invoke `bw get` once. - -#### `bitwardenFields` examples - -``` -{{ (bitwardenFields "item" "<itemid>").token.value }} -``` - ---- - -### `decrypt` *ciphertext* - -`decrypt` decrypts *ciphertext* using chezmoi's configured encryption method. - -#### `decrypt` examples - -``` -{{ joinPath .chezmoi.sourceDir ".ignored-encrypted-file.age" | include | decrypt }} -``` - ---- - -### `encrypt` *plaintext* - -`encrypt` encrypts *plaintext* using chezmoi's configured encryption method. - ---- - -### `exit` *code* - -`exit` stops template execution and causes chezmoi to exit with *code*. `exit` -is only available when chezmoi is built with Go 1.17 or later and when -generating the initial config file - ---- - -### `fromYaml` *yamltext* - -`fromYaml` returns the parsed value of *yamltext*. - -#### `fromYaml` examples - -``` -{{ (fromYaml "key1: value\nkey2: value").key2 }} -``` - ---- - -### `gitHubKeys` *user* - -`gitHubKeys` returns *user*'s public SSH keys from GitHub using the GitHub API. -The returned value is a slice of structs with `.ID` and `.Key` fields. - -**WARNING** if you use this function to populate your `~/.ssh/authorized_keys` -file then you potentially open SSH access to anyone who is able to modify or add -to your GitHub public SSH keys, possibly including certain GitHub employees. You -should not use this function on publicly-accessible machines and should always -verify that no unwanted keys have been added, for example by using the `-v` / -`--verbose` option when running `chezmoi apply` or `chezmoi update`. - -By default, an anonymous GitHub API request will be made, which is subject to -[GitHub's rate -limits](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting) -(currently 60 requests per hour per source IP address). If any of the -environment variables `$CHEZMOI_GITHUB_ACCESS_TOKEN`, `$GITHUB_ACCESS_TOKEN`, or -`$GITHUB_TOKEN` are found, then the first one found will be used to authenticate -the GitHub API request, with a higher rate limit (currently 5,000 requests per -hour per user). - -In practice, GitHub API rate limits are high enough that you should rarely need -to set a token, unless you are sharing a source IP address with many other -GitHub users. If needed, the GitHub documentation describes how to [create a -personal access -token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). - -#### `gitHubKeys` examples - -``` -{{ range (gitHubKeys "user") }} -{{- .Key }} -{{ end }} -``` - ---- - -### `gitHubLatestRelease` *user-repo* - -`gitHubLatestRelease` calls the GitHub API to retrieve the latest release about the given -*user-repo*, returning structured data as defined by the [GitHub Go API -bindings](https://pkg.go.dev/github.com/google/go-github/v41/github#RepositoryRelease). - -Calls to `gitHubLatestRelease` are cached so calling `gitHubLatestRelease` with the same -*user-repo* will only result in one call to the GitHub API. - - -`gitHubLatestRelease` uses the same API request mechanism as `gitHubKeys`. - -#### `gitHubLatestRelease` examples - -``` -{{ (gitHubLatestRelease "docker/compose").TagName }} -``` - ---- - -### `gopass` *gopass-name* - -`gopass` returns passwords stored in [gopass](https://www.gopass.pw/) using the -gopass CLI (`gopass`). *gopass-name* is passed to `gopass show --password -<gopass-name>` and the first line of the output of `gopass` is returned with the -trailing newline stripped. The output from `gopass` is cached so calling -`gopass` multiple times with the same *gopass-name* will only invoke `gopass` -once. - -#### `gopass` examples - -``` -{{ gopass "<pass-name>" }} -``` - ---- - -### `gopassRaw` *gopass-name* - -`gopass` returns raw passwords stored in [gopass](https://www.gopass.pw/) using -the gopass CLI (`gopass`). *gopass-name* is passed to `gopass show --noparsing -<gopass-name>` and the output is returned. The output from `gopassRaw` is cached -so calling `gopassRaw` multiple times with the same *gopass-name* will only -invoke `gopass` once. - ---- - -### `include` *filename* - -`include` returns the literal contents of the file named `*filename*`. Relative -paths are interpreted relative to the source directory. - ---- - -### `ioreg` - -On macOS, `ioreg` returns the structured output of the `ioreg -a -l` command, -which includes detailed information about the I/O Kit registry. - -On non-macOS operating systems, `ioreg` returns `nil`. - -The output from `ioreg` is cached so multiple calls to the `ioreg` function will -only execute the `ioreg -a -l` command once. - -#### `ioreg` examples - -``` -{{ if (eq .chezmoi.os "darwin") }} -{{ $serialNumber := index ioreg "IORegistryEntryChildren" 0 "IOPlatformSerialNumber" }} -{{ end }} -``` - ---- - -### `joinPath` *element*... - -`joinPath` joins any number of path elements into a single path, separating them -with the OS-specific path separator. Empty elements are ignored. The result is -cleaned. If the argument list is empty or all its elements are empty, `joinPath` -returns an empty string. On Windows, the result will only be a UNC path if the -first non-empty element is a UNC path. - -#### `joinPath` examples - -``` -{{ joinPath .chezmoi.homeDir ".zshrc" }} -``` - ---- - -### `keepassxc` *entry* - -`keepassxc` returns structured data retrieved from a -[KeePassXC](https://keepassxc.org/) database using the KeePassXC CLI -(`keepassxc-cli`). The database is configured by setting `keepassxc.database` in -the configuration file. *database* and *entry* are passed to `keepassxc-cli -show`. You will be prompted for the database password the first time -`keepassxc-cli` is run, and the password is cached, in plain text, in memory -until chezmoi terminates. The output from `keepassxc-cli` is parsed into -key-value pairs and cached so calling `keepassxc` multiple times with the same -*entry* will only invoke `keepassxc-cli` once. - -#### `keepassxc` examples - -``` -username = {{ (keepassxc "example.com").UserName }} -password = {{ (keepassxc "example.com").Password }} -``` - ---- - -### `keepassxcAttribute` *entry* *attribute* - -`keepassxcAttribute` returns the attribute *attribute* of *entry* using -`keepassxc-cli`, with any leading or trailing whitespace removed. It behaves -identically to the `keepassxc` function in terms of configuration, password -prompting, password storage, and result caching. - -#### `keepassxcAttribute` examples - -``` -{{ keepassxcAttribute "SSH Key" "private-key" }} -``` - ---- - -### `keyring` *service* *user* - -`keyring` retrieves the value associated with *service* and *user* from the -user's keyring. - -| OS | Keyring | -| ------- | --------------------------- | -| macOS | Keychain | -| Linux | GNOME Keyring | -| Windows | Windows Credentials Manager | - -#### `keyring` examples - -``` -[github] - user = {{ .github.user | quote }} - token = {{ keyring "github" .github.user | quote }} -``` - ---- - -### `lastpass` *id* - -`lastpass` returns structured data from [LastPass](https://lastpass.com) using -the [LastPass CLI](https://lastpass.github.io/lastpass-cli/lpass.1.html) -(`lpass`). *id* is passed to `lpass show --json <id>` and the output from -`lpass` is parsed as JSON. In addition, the `note` field, if present, is further -parsed as colon-separated key-value pairs. The structured data is an array so -typically the `index` function is used to extract the first item. The output -from `lastpass` is cached so calling `lastpass` multiple times with the same -*id* will only invoke `lpass` once. - -#### `lastpass` examples - -``` -githubPassword = {{ (index (lastpass "GitHub") 0).password | quote }} -{{ (index (lastpass "SSH") 0).note.privateKey }} -``` - ---- - -### `lastpassRaw` *id* - -`lastpassRaw` returns structured data from [LastPass](https://lastpass.com) -using the [LastPass CLI](https://lastpass.github.io/lastpass-cli/lpass.1.html) -(`lpass`). It behaves identically to the `lastpass` function, except that no -further parsing is done on the `note` field. - -#### `lastpassRaw` examples - -``` -{{ (index (lastpassRaw "SSH Private Key") 0).note }} -``` - ---- - -### `lookPath` *file* - -`lookPath` searches for an executable named *file* in the directories named by -the `PATH` environment variable. If file contains a slash, it is tried directly -and the `PATH` is not consulted. The result may be an absolute path or a path -relative to the current directory. If *file* is not found, `lookPath` returns an -empty string. - -`lookPath` is not hermetic: its return value depends on the state of the -environment and the filesystem at the moment the template is executed. Exercise -caution when using it in your templates. - -#### `lookPath` examples - -``` -{{ if lookPath "diff-so-fancy" }} -# diff-so-fancy is in $PATH -{{ end }} -``` - ---- - -### `mozillaInstallHash` *path* - -`mozillaInstallHash` returns the Mozilla install hash for *path*. This is a -convenience function to assist the management of Firefox profiles. - ---- - -### `onepassword` *uuid* [*vault-uuid* [*account-name*]] - -`onepassword` returns structured data from [1Password](https://1password.com/) -using the [1Password -CLI](https://support.1password.com/command-line-getting-started/) (`op`). *uuid* -is passed to `op get item <uuid>` and the output from `op` is parsed as JSON. -The output from `op` is cached so calling `onepassword` multiple times with the -same *uuid* will only invoke `op` once. If the optional *vault-uuid* is -supplied, it will be passed along to the `op get` call, which can significantly -improve performance. If the optional *account-name* is supplied, it will be -passed along to the `op get` call, which will help it look in the right account, -in case you have multiple accounts (eg. personal and work accounts). If there is -no valid session in the environment, by default you will be interactively -prompted to sign in. - -#### `onepassword` examples - -``` -{{ (onepassword "<uuid>").details.password }} -{{ (onepassword "<uuid>" "<vault-uuid>").details.password }} -{{ (onepassword "<uuid>" "<vault-uuid>" "<account-name>").details.password }} -{{ (onepassword "<uuid>" "" "<account-name>").details.password }} -``` - ---- - -### `onepasswordDocument` *uuid* [*vault-uuid* [*account-name*]] - -`onepassword` returns a document from [1Password](https://1password.com/) using -the [1Password CLI](https://support.1password.com/command-line-getting-started/) -(`op`). *uuid* is passed to `op get document <uuid>` and the output from `op` is -returned. The output from `op` is cached so calling `onepasswordDocument` -multiple times with the same *uuid* will only invoke `op` once. If the optional -*vault-uuid* is supplied, it will be passed along to the `op get` call, which -can significantly improve performance. If the optional *account-name* is -supplied, it will be passed along to the `op get` call, which will help it look -in the right account, in case you have multiple accounts (eg. personal and work -accounts). If there is no valid session in the environment, by default you will -be interactively prompted to sign in. - -#### `onepasswordDocument` examples - -``` -{{- onepasswordDocument "<uuid>" -}} -{{- onepasswordDocument "<uuid>" "<vault-uuid>" -}} -{{- onepasswordDocument "<uuid>" "<vault-uuid>" "<account-name>" -}} -{{- onepasswordDocument "<uuid>" "" "<account-name>" -}} -``` - ---- - -### `onepasswordDetailsFields` *uuid* [*vault-uuid* [*account-name*]] - -`onepasswordDetailsFields` returns structured data from -[1Password](https://1password.com/) using the [1Password -CLI](https://support.1password.com/command-line-getting-started/) (`op`). *uuid* -is passed to `op get item <uuid>`, the output from `op` is parsed as JSON, and -elements of `details.fields` are returned as a map indexed by each field's -`designation`. If there is no valid session in the environment, by default you -will be interactively prompted to sign in. For example, give the output from -`op`: - -```json -{ - "uuid": "<uuid>", - "details": { - "fields": [ - { - "designation": "username", - "name": "username", - "type": "T", - "value": "exampleuser" - }, - { - "designation": "password", - "name": "password", - "type": "P", - "value": "examplepassword" - } - ] - } -} -``` - -the return value will be the map: - -```json -{ - "username": { - "designation": "username", - "name": "username", - "type": "T", - "value": "exampleuser" - }, - "password": { - "designation": "password", - "name": "password", - "type": "P", - "value": "examplepassword" - } -} -``` - -The output from `op` is cached so calling `onepasswordDetailsFields` multiple -times with the same *uuid* will only invoke `op` once. If the optional -*vault-uuid* is supplied, it will be passed along to the `op get` call, which -can significantly improve performance. If the optional *account-name* is -supplied, it will be passed along to the `op get` call, which will help it look -in the right account, in case you have multiple accounts (eg. personal and work -accounts). - -#### `onepasswordDetailsFields` examples - -``` -{{ (onepasswordDetailsFields "<uuid>").password.value }} -{{ (onepasswordDetailsFields "<uuid>" "<vault-uuid>").password.value }} -{{ (onepasswordDetailsFields "<uuid>" "<vault-uuid>" "<account-name>").password.value }} -{{ (onepasswordDetailsFields "<uuid>" "" "<account-name>").password.value }} -``` - ---- - -### `onepasswordItemFields` *uuid* [*vault-uuid* [*account-name*]] - -`onepasswordItemFields` returns structured data from -[1Password](https://1password.com/) using the [1Password -CLI](https://support.1password.com/command-line-getting-started/) (`op`). *uuid* -is passed to `op get item <uuid>`, the output from `op` is parsed as JSON, and -each element of `details.sections` are iterated over and any `fields` are -returned as a map indexed by each field's `n`. If there is no valid session in -the environment, by default you will be interactively prompted to sign in. For -example, give the output from `op`: - -```json -{ - "uuid": "<uuid>", - "details": { - "sections": [ - { - "name": "linked items", - "title": "Related Items" - }, - { - "fields": [ - { - "k": "string", - "n": "D4328E0846D2461E8E455D7A07B93397", - "t": "exampleLabel", - "v": "exampleValue" - } - ], - "name": "Section_20E0BD380789477D8904F830BFE8A121", - "title": "" - } - ] - }, -} -``` - -the return value will be the map: - -```json -{ - "exampleLabel": { - "k": "string", - "n": "D4328E0846D2461E8E455D7A07B93397", - "t": "exampleLabel", - "v": "exampleValue" - } -} -``` - -The result of - -``` -{{ (onepasswordItemFields "abcdefghijklmnopqrstuvwxyz").exampleLabel.v }} -``` - -is equivalent to calling - -```console -$ op get item abcdefghijklmnopqrstuvwxyz --fields exampleLabel -``` - ---- - -### `output` *name* [*arg*...] - -`output` returns the output of executing the command *name* with *arg*s. If -executing the command returns an error then template execution exits with an -error. The execution occurs every time that the template is executed. It is the -user's responsibility to ensure that executing the command is both idempotent -and fast. - -#### `output` examples - -``` -current-context: {{ output "kubectl" "config" "current-context" | trim }} -``` - ---- - -### `pass` *pass-name* - -`pass` returns passwords stored in [pass](https://www.passwordstore.org/) using -the pass CLI (`pass`). *pass-name* is passed to `pass show <pass-name>` and the -first line of the output of `pass` is returned with the trailing newline -stripped. The output from `pass` is cached so calling `pass` multiple times with -the same *pass-name* will only invoke `pass` once. - -#### `pass` examples - -``` -{{ pass "<pass-name>" }} -``` - ---- - -### `passFields` *pass-name* - -`passFields` returns structured data stored in -[pass](https://www.passwordstore.org) using the pass CLI (`pass`). *pass-name* -is passed to `pass show <pass-name>` and the output is parsed as colon-separated -key-value pairs, one per line. The return value is a map of keys to values. For -example, given the output from `pass`: - -``` -GitHub -login: username -password: secret -``` - -the return value will be a map: - -```json -{ - "login": "username", - "password": "secret" -} -``` - -#### `passFields` examples - -``` -{{ (passFields "GitHub").password }} -``` - ---- - -### `passRaw` *pass-name* - -`passRaw` returns passwords stored in [pass](https://www.passwordstore.org/) -using the pass CLI (`pass`). *pass-name* is passed to `pass show <pass-name>` -and the output is returned. The output from `pass` is cached so calling -`passRaw` multiple times with the same *pass-name* will only invoke `pass` once. - ---- - -### `promptBool` *prompt* [*default*] - -`promptBool` prompts the user with *prompt* and returns the user's response -interpreted as a boolean. If *default* is passed the user's response is empty -then it returns *default*. It is only available when generating the initial -config file. The user's response is interpreted as follows (case insensitive): - -| Response | Result | -| ----------------------- | ------- | -| 1, on, t, true, y, yes | `true` | -| 0, off, f, false, n, no | `false` | - ---- - -### `promptInt` *prompt* [*default*] - -`promptInt` prompts the user with *prompt* and returns the user's response -interpreted as an integer. If *default* is passed and the user's response is -empty then it returns *default*. It is only available when generating the -initial config file. - ---- - -### `promptString` *prompt* [*default*] - -`promptString` prompts the user with *prompt* and returns the user's response -with all leading and trailing spaces stripped. If *default* is passed and the -user's response is empty then it returns *default*. It is only available when -generating the initial config file. - -#### `promptString` examples - -``` -{{ $email := promptString "email" -}} -[data] - email = {{ $email | quote }} -``` - ---- - -### `secret` [*arg*...] - -`secret` returns the output of the generic secret command defined by the -`secret.command` configuration variable with *arg*s with leading and trailing -whitespace removed. The output is cached so multiple calls to `secret` with the -same *arg*s will only invoke the generic secret command once. - ---- - -### `secretJSON` [*arg*...] - -`secretJSON` returns structured data from the generic secret command defined by -the `secret.command` configuration variable with *arg*s. The output is parsed as -JSON. The output is cached so multiple calls to `secret` with the same *args* -will only invoke the generic secret command once. - ---- - -### `stat` *name* - -`stat` runs `stat(2)` on *name*. If *name* exists it returns structured data. If -*name* does not exist then it returns a false value. If `stat(2)` returns any -other error then it raises an error. The structured value returned if *name* -exists contains the fields `name`, `size`, `mode`, `perm`, `modTime`, and -`isDir`. - -`stat` is not hermetic: its return value depends on the state of the filesystem -at the moment the template is executed. Exercise caution when using it in your -templates. - -#### `stat` examples - -``` -{{ if stat (joinPath .chezmoi.homeDir ".pyenv") }} -# ~/.pyenv exists -{{ end }} -``` - ---- - -### `stdinIsATTY` - -`stdinIsATTY` returns `true` if chezmoi's standard input is a TTY. It is only -available when generating the initial config file. It is primarily useful for -determining whether `prompt*` functions should be called or default values be -used. - -#### `stdinIsATTY` examples - -``` -{{ $email := "" }} -{{ if stdinIsATTY }} -{{ $email = promptString "email" }} -{{ else }} -{{ $email = "[email protected]" }} -{{ end }} -``` - ---- - -### `toYaml` *value* - -`toYaml` returns the YAML representation of *value*. - -#### `toYaml` examples - -``` -{{ dict "key" "value" | toYaml }} -``` - ---- - -### `vault` *key* - -`vault` returns structured data from [Vault](https://www.vaultproject.io/) using -the [Vault CLI](https://www.vaultproject.io/docs/commands/) (`vault`). *key* is -passed to `vault kv get -format=json <key>` and the output from `vault` is -parsed as JSON. The output from `vault` is cached so calling `vault` multiple -times with the same *key* will only invoke `vault` once. - -#### `vault` examples - -``` -{{ (vault "<key>").data.data.password }} -``` - ---- - -### `writeToStdout` *string*... - -`writeToStdout` writes each *string* to stdout. It is only available when -generating the initial config file. - -#### `writeToStdout` examples - -``` -{{- writeToStdout "Hello, world\n" -}} -``` diff --git a/docs/docs.go b/docs/docs.go deleted file mode 100644 index d25784f4cc8..00000000000 --- a/docs/docs.go +++ /dev/null @@ -1,8 +0,0 @@ -// Package docs contains chezmoi's documentation. -package docs - -import "embed" - -// FS contains all docs. -//go:embed *.md -var FS embed.FS diff --git a/internal/cmd/cmd.go b/internal/cmd/cmd.go index 9cf63b41322..1ef01a6b818 100644 --- a/internal/cmd/cmd.go +++ b/internal/cmd/cmd.go @@ -2,11 +2,8 @@ package cmd import ( - "bufio" - "bytes" "errors" "fmt" - "io" "os" "regexp" "strconv" @@ -18,7 +15,7 @@ import ( "go.etcd.io/bbolt" "go.uber.org/multierr" - "github.com/twpayne/chezmoi/v2/docs" + "github.com/twpayne/chezmoi/v2/assets/chezmoi.io/docs/reference/commands" "github.com/twpayne/chezmoi/v2/internal/chezmoi" ) @@ -46,15 +43,9 @@ const ( var ( noArgs = []string(nil) - commandsRx = regexp.MustCompile(`^## Commands`) - commandRx = regexp.MustCompile("^### `(\\S+)`") - exampleRx = regexp.MustCompile("^#### `.+` examples") - optionRx = regexp.MustCompile("^#### `(-\\w|--\\w+)`") - endOfCommandsRx = regexp.MustCompile("^## ") - horizontalRuleRx = regexp.MustCompile(`^---`) - trailingSpaceRx = regexp.MustCompile(` +\n`) + trailingSpaceRx = regexp.MustCompile(` +\n`) - helps map[string]*help + helps = make(map[string]*help) ) // A VersionInfo contains a version. @@ -66,19 +57,54 @@ type VersionInfo struct { } type help struct { - long string - example string + longHelp string + example string } func init() { - reference, err := docs.FS.ReadFile("REFERENCE.md") + dirEntries, err := commands.FS.ReadDir(".") if err != nil { panic(err) } - helps, err = extractHelps(bytes.NewReader(reference)) + + longHelpStyleConfig := glamour.ASCIIStyleConfig + longHelpStyleConfig.Code.StylePrimitive.BlockPrefix = "" + longHelpStyleConfig.Code.StylePrimitive.BlockSuffix = "" + longHelpStyleConfig.Emph.BlockPrefix = "" + longHelpStyleConfig.Emph.BlockSuffix = "" + longHelpStyleConfig.H2.Prefix = "" + longHelpTermRenderer, err := glamour.NewTermRenderer( + glamour.WithStyles(longHelpStyleConfig), + glamour.WithWordWrap(80), + ) + if err != nil { + panic(err) + } + + exampleStyleConfig := glamour.ASCIIStyleConfig + exampleStyleConfig.Code.StylePrimitive.BlockPrefix = "" + exampleStyleConfig.Code.StylePrimitive.BlockSuffix = "" + exampleStyleConfig.Document.Margin = nil + exampleTermRenderer, err := glamour.NewTermRenderer( + glamour.WithStyles(exampleStyleConfig), + glamour.WithWordWrap(80), + ) if err != nil { panic(err) } + + for _, dirEntry := range dirEntries { + command := strings.TrimSuffix(dirEntry.Name(), ".md") + data, err := commands.FS.ReadFile(dirEntry.Name()) + if err != nil { + panic(err) + } + help, err := extractHelp(command, data, longHelpTermRenderer, exampleTermRenderer) + if err != nil { + panic(err) + } + helps[command] = help + } } // MarshalZerologObject implements @@ -126,129 +152,78 @@ func example(command string) string { } // extractHelps returns the helps parse from r. -func extractHelps(r io.Reader) (map[string]*help, error) { - longStyleConfig := glamour.ASCIIStyleConfig - longStyleConfig.Code.StylePrimitive.BlockPrefix = "" - longStyleConfig.Code.StylePrimitive.BlockSuffix = "" - longStyleConfig.Emph.BlockPrefix = "" - longStyleConfig.Emph.BlockSuffix = "" - longStyleConfig.H4.Prefix = "" - longTermRenderer, err := glamour.NewTermRenderer( - glamour.WithStyles(longStyleConfig), - glamour.WithWordWrap(80), - ) - if err != nil { - return nil, err - } - - examplesStyleConfig := glamour.ASCIIStyleConfig - examplesStyleConfig.Document.Margin = nil - examplesTermRenderer, err := glamour.NewTermRenderer( - glamour.WithStyles(examplesStyleConfig), - glamour.WithWordWrap(80), - ) - if err != nil { - return nil, err - } - +func extractHelp( + command string, data []byte, longHelpTermRenderer, exampleTermRenderer *glamour.TermRenderer, +) (*help, error) { type stateType int const ( - stateFindCommands stateType = iota - stateFindFirstCommand - stateInCommand - stateFindExample + stateReadTitle stateType = iota + stateInLongHelp + stateInOptions stateInExample + stateInAdmonition ) - var ( - state = stateFindCommands - builder = &strings.Builder{} - h *help - ) - - saveAndReset := func() error { - var termRenderer *glamour.TermRenderer - switch state { - case stateInCommand, stateFindExample: - termRenderer = longTermRenderer - case stateInExample: - termRenderer = examplesTermRenderer - default: - panic(fmt.Sprintf("%d: invalid state", state)) - } - s, err := termRenderer.Render(builder.String()) - if err != nil { - return err - } - s = trailingSpaceRx.ReplaceAllString(s, "\n") - s = strings.Trim(s, "\n") - switch state { - case stateInCommand, stateFindExample: - h.long = "Description:\n" + s - case stateInExample: - h.example = s - default: - panic(fmt.Sprintf("%d: invalid state", state)) - } - builder.Reset() - return nil - } - - helps := make(map[string]*help) - s := bufio.NewScanner(r) -FOR: - for s.Scan() { + state := stateReadTitle + var longHelpLines []string + var exampleLines []string + for _, line := range strings.Split(string(data), "\n") { switch state { - case stateFindCommands: - if commandsRx.MatchString(s.Text()) { - state = stateFindFirstCommand + case stateReadTitle: + titleRx, err := regexp.Compile("# `" + command + "`") + if err != nil { + return nil, err } - case stateFindFirstCommand: - if m := commandRx.FindStringSubmatch(s.Text()); m != nil { - h = &help{} - helps[m[1]] = h - state = stateInCommand + if titleRx.MatchString(line) { + state = stateInLongHelp } - case stateInCommand, stateFindExample, stateInExample: - switch m := commandRx.FindStringSubmatch(s.Text()); { - case m != nil: - if err := saveAndReset(); err != nil { - return nil, err - } - h = &help{} - helps[m[1]] = h - state = stateInCommand - case optionRx.MatchString(s.Text()): - state = stateFindExample - case exampleRx.MatchString(s.Text()): - if err := saveAndReset(); err != nil { - return nil, err - } + case stateInLongHelp: + switch { + case strings.HasPrefix(line, "## "): + state = stateInOptions + case line == "!!! example": + state = stateInExample + case strings.HasPrefix(line, "!!!"): + state = stateInAdmonition + default: + longHelpLines = append(longHelpLines, line) + } + case stateInOptions: + if line == "!!! example" { + state = stateInExample + } + case stateInExample: + exampleLines = append(exampleLines, strings.TrimPrefix(line, " ")) + case stateInAdmonition: + if line == "!!! example" { state = stateInExample - case endOfCommandsRx.MatchString(s.Text()): - if err := saveAndReset(); err != nil { - return nil, err - } - break FOR - case horizontalRuleRx.MatchString(s.Text()): - if err := saveAndReset(); err != nil { - return nil, err - } - state = stateFindFirstCommand - case state != stateFindExample: - if _, err := builder.WriteString(s.Text()); err != nil { - return nil, err - } - if err := builder.WriteByte('\n'); err != nil { - return nil, err - } } } } - if err := s.Err(); err != nil { + + longHelp, err := renderLines(longHelpLines, longHelpTermRenderer) + if err != nil { return nil, err } - return helps, nil + example, err := renderLines(exampleLines, exampleTermRenderer) + if err != nil { + return nil, err + } + return &help{ + longHelp: "Description:\n" + longHelp, + example: example, + }, nil +} + +// renderLines renders lines, trimming extraneous whitespace. +func renderLines(lines []string, termRenderer *glamour.TermRenderer) (string, error) { + renderedLines, err := termRenderer.Render(strings.Join(lines, "\n")) + if err != nil { + return "", err + } + renderedLines = trailingSpaceRx.ReplaceAllString(renderedLines, "\n") + renderedLines = strings.Trim(renderedLines, "\n") + return renderedLines, nil } // markPersistentFlagsRequired marks all of flags as required for cmd. @@ -267,7 +242,7 @@ func mustLongHelp(command string) string { if !ok { panic(fmt.Sprintf("missing long help for command %s", command)) } - return help.long + return help.longHelp } // runMain runs chezmoi's main function. diff --git a/internal/cmds/generate-chezmoi.io-content-docs/main.go b/internal/cmds/generate-chezmoi.io-content-docs/main.go deleted file mode 100644 index 33cd2cde56d..00000000000 --- a/internal/cmds/generate-chezmoi.io-content-docs/main.go +++ /dev/null @@ -1,78 +0,0 @@ -package main - -import ( - "bufio" - "flag" - "fmt" - "log" - "os" - "path" - "regexp" - "strings" -) - -var ( - debug = flag.Bool("debug", false, "debug") - shortTitle = flag.String("shorttitle", "", "short title") - longTitle = flag.String("longtitle", "", "long title") - - replaceURLRegexp = regexp.MustCompile(`https://github\.com/twpayne/chezmoi/blob/master/docs/[A-Z]+\.md`) - nonStandardPageRenames = map[string]string{ - "HOWTO": "how-to", - "QUICKSTART": "quick-start", - } -) - -func run() error { - flag.Parse() - - fmt.Printf(""+ - "---\n"+ - "title: %q\n"+ - "---\n"+ - "\n", - *shortTitle, - ) - - s := bufio.NewScanner(os.Stdin) - state := "replace-title" - for s.Scan() { - if *debug { - log.Printf("%s: %q", state, s.Text()) - } - switch state { - case "replace-title": - fmt.Printf("# %s\n\n", *longTitle) - state = "find-toc" - case "find-toc": - if s.Text() == "<!--- toc --->" { - state = "skip-toc" - } - case "skip-toc": - if s.Text() == "" { - state = "copy-content" - } - case "copy-content": - text := s.Text() - text = replaceURLRegexp.ReplaceAllStringFunc(text, func(s string) string { - name := path.Base(s) - name = strings.TrimSuffix(name, path.Ext(name)) - var ok bool - newName, ok := nonStandardPageRenames[name] - if !ok { - newName = strings.ToLower(name) - } - return "/docs/" + newName + "/" - }) - fmt.Println(text) - } - } - return s.Err() -} - -func main() { - if err := run(); err != nil { - fmt.Println(err) - os.Exit(1) - } -}
feat
Switch to Material for MkDocs for website
cb3db977ae221e028b38a3aa10f0ff1e7dc47982
2022-03-21 20:16:32
Tom Payne
chore: Bump gofumpt to version 0.3.1
false
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fdac67b285d..418e42c1c83 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ on: env: AGE_VERSION: 1.0.0 GO_VERSION: 1.18 - GOFUMPT_VERSION: 0.3.0 + GOFUMPT_VERSION: 0.3.1 GOLANGCI_LINT_VERSION: 1.45.0 jobs: build-website:
chore
Bump gofumpt to version 0.3.1
2a39175b380cc1efb03a75d0eb5417755e7f71b0
2021-11-07 22:02:40
Tom Payne
feat: Add pinentry as an option for reading passwords
false
diff --git a/docs/REFERENCE.md b/docs/REFERENCE.md index 665fb379eb2..aa1c3759d74 100644 --- a/docs/REFERENCE.md +++ b/docs/REFERENCE.md @@ -92,6 +92,8 @@ Manage your dotfiles across multiple machines, securely. * [`upgrade`](#upgrade) * [`verify` [*target*...]](#verify-target) * [Editor configuration](#editor-configuration) +* [pinentry configuration](#pinentry-configuration) + * [Example pinentry configuration](#example-pinentry-configuration) * [Umask configuration](#umask-configuration) * [Template execution](#template-execution) * [Template variables](#template-variables) @@ -392,6 +394,9 @@ The following configuration variables are available: | `onepassword` | `cache` | bool | `true` | Enable optional caching provided by `op` | | | `command` | string | `op` | 1Password CLI command | | `pass` | `command` | string | `pass` | Pass CLI command | +| `pinentry` | `args` | []string | *none* | Extra args to the pinentry command | +| | `command` | string | *none* | pinentry command | +| | `options` | []string | *see `pinentry` below* | Extra options for pinentry | | `template` | `options` | []string | `["missingkey=error"]` | Template options | | `vault` | `command` | string | `vault` | Vault CLI command | @@ -1755,6 +1760,32 @@ specified first. --- +## pinentry configuration + +By default, chezmoi will request passwords from the terminal. + +If the `--no-tty` option is passed, then chezmoi will instead read passwords +from the standard input. + +Otherwise, if the configuration variable `pinentry.command` is set then chezmoi +will instead used the given command to read passwords, assuming that it follows +the [Assuan protocol](https://www.gnupg.org/documentation/manuals/assuan.pdf) +like [GnuPG's +pinentry](https://www.gnupg.org/related_software/pinentry/index.html). The +configuration variable `pinentry.args` specifies extra arguments to be passed to +`pinentry.command` and the configuration variable `pinentry.options` specifies +extra options to be set. The default `pinentry.options` is +`["allow-external-password-cache"]`. + +### Example pinentry configuration + +```toml +[pinentry] + command = "pinentry" +``` + +--- + ## Umask configuration By default, chezmoi uses your current umask as set by your operating system and diff --git a/go.mod b/go.mod index 4681f6fe4a5..c8fd791f6e4 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/muesli/termenv v0.9.0 // indirect github.com/pelletier/go-toml v1.9.4 github.com/rogpeppe/go-internal v1.8.0 - github.com/rs/zerolog v1.25.0 + github.com/rs/zerolog v1.26.0 github.com/sergi/go-diff v1.1.0 github.com/spf13/afero v1.6.0 github.com/spf13/cobra v1.2.1 @@ -57,6 +57,7 @@ require ( github.com/mattn/go-isatty v0.0.14 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/stretchr/objx v0.3.0 // indirect + github.com/twpayne/go-pinentry v0.0.2 golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect golang.org/x/text v0.3.7 // indirect ) diff --git a/go.sum b/go.sum index d97bdc0889a..61e4730bc23 100644 --- a/go.sum +++ b/go.sum @@ -490,6 +490,8 @@ github.com/rs/xid v1.3.0 h1:6NjYksEUlhurdVehpc7S7dk6DAmcKv8V9gG0FsVN2U4= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.25.0 h1:Rj7XygbUHKUlDPcVdoLyR91fJBsduXj5fRxyqIQj/II= github.com/rs/zerolog v1.25.0/go.mod h1:7KHcEGe0QZPOm2IE4Kpb5rTh6n1h2hIgS5OOnu1rUaI= +github.com/rs/zerolog v1.26.0 h1:ORM4ibhEZeTeQlCojCK2kPz1ogAY4bGs4tD+SaAdGaE= +github.com/rs/zerolog v1.26.0/go.mod h1:yBiM87lvSqX8h0Ww4sdzNSkVYZ8dL2xjZJG1lAuGZEo= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M= @@ -547,6 +549,8 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= +github.com/twpayne/go-pinentry v0.0.2 h1:xncgnq3VGWgOq5gMx1SmK++7PrfvkvqZZY00SijBASs= +github.com/twpayne/go-pinentry v0.0.2/go.mod h1:OUbsOnVXqvfSr8PZzFkSNJdBTJOPepfM0NSlDmR5paY= github.com/twpayne/go-shell v0.3.1 h1:JIC6cyDpG/p8mRnFUleH07roi90q0J9QC8PnvtmYLRo= github.com/twpayne/go-shell v0.3.1/go.mod h1:H/gzux0DOH5jsjQSHXs6rs2Onxy+V4j6ycZTOulC0l8= github.com/twpayne/go-vfs/v3 v3.0.0 h1:rMFBISZVhSowKeX1BxL8utM64V7CuUw9/rfekPdS7to= @@ -567,6 +571,7 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.3/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1 h1:/vn0k+RBvwlxEmP5E7SZMqNxPhfMVFEJiykr15/0XKM= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.2 h1:5qVKCqCRBaGz8EepBTi7pbIw8gGCFnB1Mi6kXU4dYv8= @@ -698,6 +703,7 @@ golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211029224645-99673261e6eb h1:pirldcYWx7rx7kE5r+9WsOXPXK0+WH5+uZ7uPmJ44uM= @@ -796,6 +802,7 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -883,6 +890,7 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5 h1:ouewzE6p+/VEB31YYnTbEJdi8pFqKp4P4n85vwo3DHA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/internal/cmd/config.go b/internal/cmd/config.go index 49b00f7d549..d30a6b4437e 100644 --- a/internal/cmd/config.go +++ b/internal/cmd/config.go @@ -71,6 +71,7 @@ type Config struct { Interpreters map[string]*chezmoi.Interpreter `mapstructure:"interpreters"` Mode chezmoi.Mode `mapstructure:"mode"` Pager string `mapstructure:"pager"` + PINEntry pinEntryConfig `mapstructure:"pinentry"` Safe bool `mapstructure:"safe"` SourceDirAbsPath chezmoi.AbsPath `mapstructure:"sourceDir"` Template templateConfig `mapstructure:"template"` @@ -234,7 +235,10 @@ func newConfig(options ...configOption) (*Config, error) { }, Interpreters: defaultInterpreters, Pager: os.Getenv("PAGER"), - Safe: true, + PINEntry: pinEntryConfig{ + Options: pinEntryDefaultOptions, + }, + Safe: true, Template: templateConfig{ Options: chezmoi.DefaultTemplateOptions, }, diff --git a/internal/cmd/config_unix.go b/internal/cmd/config_unix.go index 0c8bab556c9..d15283b1e0b 100644 --- a/internal/cmd/config_unix.go +++ b/internal/cmd/config_unix.go @@ -18,6 +18,10 @@ func (c *Config) readPassword(prompt string) (password string, err error) { return } + if c.PINEntry.Command != "" { + return c.readPINEntry(prompt) + } + var tty *os.File if tty, err = os.OpenFile("/dev/tty", os.O_RDWR, 0); err != nil { return diff --git a/internal/cmd/config_windows.go b/internal/cmd/config_windows.go index 3741ef49156..73101622014 100644 --- a/internal/cmd/config_windows.go +++ b/internal/cmd/config_windows.go @@ -15,6 +15,10 @@ func (c *Config) readPassword(prompt string) (password string, err error) { return } + if c.PINEntry.Command != "" { + return c.readPINEntry(prompt) + } + var name *uint16 name, err = windows.UTF16PtrFromString("CONIN$") if err != nil { diff --git a/internal/cmd/doctorcmd.go b/internal/cmd/doctorcmd.go index 86364e237cb..6999337c92f 100644 --- a/internal/cmd/doctorcmd.go +++ b/internal/cmd/doctorcmd.go @@ -197,6 +197,14 @@ func (c *Config) runDoctorCmd(cmd *cobra.Command, args []string) error { versionRx: regexp.MustCompile(`(?m)^gpg\s+\(.*?\)\s+(\d+\.\d+\.\d+)`), ifNotSet: checkResultWarning, }, + &binaryCheck{ + name: "pinentry-command", + binaryname: c.PINEntry.Command, + versionArgs: []string{"--version"}, + versionRx: regexp.MustCompile(`^\S+\s+\(pinentry\)\s+(\d+\.\d+\.\d+)`), + ifNotSet: checkResultInfo, + ifNotExist: checkResultWarning, + }, &binaryCheck{ name: "1password-command", binaryname: c.Onepassword.Command, diff --git a/internal/cmd/pinentry.go b/internal/cmd/pinentry.go new file mode 100644 index 00000000000..3150c89718c --- /dev/null +++ b/internal/cmd/pinentry.go @@ -0,0 +1,37 @@ +package cmd + +import ( + "github.com/twpayne/go-pinentry" + "go.uber.org/multierr" +) + +type pinEntryConfig struct { + Command string `mapstructure:"command"` + Args []string `mapstructure:"args"` + Options []string `mapstructure:"options"` +} + +var pinEntryDefaultOptions = []string{ + pinentry.OptionAllowExternalPasswordCache, +} + +func (c *Config) readPINEntry(prompt string) (pin string, err error) { + var client *pinentry.Client + client, err = pinentry.NewClient( + pinentry.WithArgs(c.PINEntry.Args), + pinentry.WithBinaryName(c.PINEntry.Command), + pinentry.WithGPGTTY(), + pinentry.WithOptions(c.PINEntry.Options), + pinentry.WithPrompt(prompt), + pinentry.WithTitle("chezmoi"), + ) + if err != nil { + return + } + defer func() { + err = multierr.Append(err, client.Close()) + }() + + pin, _, err = client.GetPIN() + return +} diff --git a/internal/cmd/testdata/scripts/doctor_unix.txt b/internal/cmd/testdata/scripts/doctor_unix.txt index cbaee11c0c3..15def3254b1 100644 --- a/internal/cmd/testdata/scripts/doctor_unix.txt +++ b/internal/cmd/testdata/scripts/doctor_unix.txt @@ -9,6 +9,7 @@ chmod 755 bin/keepassxc chmod 755 bin/lpass chmod 755 bin/op chmod 755 bin/pass +chmod 755 bin/pinentry chmod 755 bin/secret chmod 755 bin/vault chmod 755 bin/vimdiff @@ -30,6 +31,7 @@ stdout '^ok\s+git-command\s+' stdout '^ok\s+merge-command\s+' stdout '^ok\s+age-command\s+' stdout '^ok\s+gpg-command\s+' +stdout '^ok\s+pinentry-command\s+' stdout '^ok\s+1password-command\s+' stdout '^ok\s+bitwarden-command\s+' stdout '^ok\s+gopass-command\s+' @@ -112,6 +114,14 @@ echo "= [email protected] =" echo "= =" echo "= http://www.passwordstore.org/ =" echo "============================================" +-- bin/pinentry -- +#!/bin/sh + +echo "pinentry-curses (pinentry) 1.2.0" +echo "Copyright (C) 2016 g10 Code GmbH" +echo "License GPLv2+: GNU GPL version 2 or later <https://www.gnu.org/licenses/>" +echo "This is free software: you are free to change and redistribute it." +echo "There is NO WARRANTY, to the extent permitted by law." -- bin/secret -- #!/bin/sh -- bin/vault -- @@ -121,9 +131,11 @@ echo "Vault v1.5.5 ('f5d1ddb3750e7c28e25036e1ef26a4c02379fc01+CHANGES')" -- bin/vimdiff -- #!/bin/sh -- home/user/.config/chezmoi/chezmoi.toml -- -[secret] - command = "secret" [keepassxc] command = "keepassxc" +[pinentry] + command = "pinentry" +[secret] + command = "secret" -- home/user/.config/chezmoi/chezmoi.yaml -- -- home3/user/.local/share/chezmoi/.chezmoisuspicious --
feat
Add pinentry as an option for reading passwords
021a5e36380bf9e24d46a0bc6883bceb29f18aec
2022-10-20 20:34:28
Tom Payne
docs: Add links to release notes and history to index and install pages
false
diff --git a/assets/chezmoi.io/.gitignore b/assets/chezmoi.io/.gitignore index 5761d85dcb9..244f591e75f 100644 --- a/assets/chezmoi.io/.gitignore +++ b/assets/chezmoi.io/.gitignore @@ -1,4 +1,5 @@ __pycache__ +/docs/index.md /docs/install.md /docs/links/articles-podcasts-and-videos.md /docs/reference/configuration-file/variables.md diff --git a/assets/chezmoi.io/docs/index.md b/assets/chezmoi.io/docs/index.md.tmpl similarity index 90% rename from assets/chezmoi.io/docs/index.md rename to assets/chezmoi.io/docs/index.md.tmpl index 349e604ab3e..b3b0eeebb9f 100644 --- a/assets/chezmoi.io/docs/index.md +++ b/assets/chezmoi.io/docs/index.md.tmpl @@ -1,7 +1,12 @@ +{{- $latestRelease := gitHubLatestRelease "twpayne/chezmoi" -}} +{{- $version := $latestRelease.Name | trimPrefix "v" -}} # chezmoi Manage your dotfiles across multiple diverse machines, securely. +The latest version of chezmoi is {{ $version }} ([release notes]({{ +$latestRelease.HTMLURL }}), [release history](/reference/release-history)). + chezmoi helps you manage your personal configuration files (dotfiles, like `~/.gitconfig`) across multiple machines. diff --git a/assets/chezmoi.io/docs/install.md.tmpl b/assets/chezmoi.io/docs/install.md.tmpl index 460b677609c..f545fbdab93 100644 --- a/assets/chezmoi.io/docs/install.md.tmpl +++ b/assets/chezmoi.io/docs/install.md.tmpl @@ -1,7 +1,9 @@ -{{- $version := gitHubLatestRelease "twpayne/chezmoi" -}} +{{- $latestRelease := gitHubLatestRelease "twpayne/chezmoi" -}} +{{- $version := $latestRelease.Name | trimPrefix "v" -}} # Install -The latest version of chezmoi is {{ $version }}. +The latest version of chezmoi is {{ $version }} ([release notes]({{ +$latestRelease.HTMLURL }}), [release history](/reference/release-history)). ## One-line package install diff --git a/assets/chezmoi.io/docs/install.md.yaml b/assets/chezmoi.io/docs/install.md.yaml deleted file mode 100644 index e69de29bb2d..00000000000
docs
Add links to release notes and history to index and install pages
f1bd0f887914eeb0d4f8f748ddab86e772340245
2024-11-30 06:00:12
Tom Payne
chore: Break long line
false
diff --git a/internal/cmd/config.go b/internal/cmd/config.go index aaa4319808b..218fb5a65cc 100644 --- a/internal/cmd/config.go +++ b/internal/cmd/config.go @@ -2496,7 +2496,9 @@ func (c *Config) runEditor(args []string) error { return err } if c.Edit.Hardlink && filepath.Base(editor) == "hx" { - c.errorf("warning: helix editor cannot edit hardlinks, see https://github.com/helix-editor/helix/issues/11279 and https://github.com/twpayne/chezmoi/issues/3971") + c.errorf( + "warning: helix editor cannot edit hardlinks, see https://github.com/helix-editor/helix/issues/11279 and https://github.com/twpayne/chezmoi/issues/3971", + ) } start := time.Now() err = c.run(chezmoi.EmptyAbsPath, editor, editorArgs)
chore
Break long line
523dd10f2a2d28cd48a00f856aac289c25d597d9
2022-11-03 01:56:40
Tom Payne
fix: Fix file hashes when showing scripts in diffs
false
diff --git a/pkg/chezmoi/gitdiffsystem.go b/pkg/chezmoi/gitdiffsystem.go index 9f0632a1e4f..a997a45598b 100644 --- a/pkg/chezmoi/gitdiffsystem.go +++ b/pkg/chezmoi/gitdiffsystem.go @@ -200,12 +200,12 @@ func (s *GitDiffSystem) RunCmd(cmd *exec.Cmd) error { // RunScript implements System.RunScript. func (s *GitDiffSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, interpreter *Interpreter) error { if s.filter.IncludeEntryTypeBits(EntryTypeScripts) { - mode := fs.FileMode(filemode.Executable) + fromMode, toMode := fs.FileMode(0), fs.FileMode(filemode.Executable) fromData, toData := []byte(nil), data if s.reverse { fromData, toData = toData, fromData } - diffPatch, err := DiffPatch(scriptname, fromData, mode, toData, mode) + diffPatch, err := DiffPatch(scriptname, fromData, fromMode, toData, toMode) if err != nil { return err } diff --git a/pkg/cmd/testdata/scripts/exclude.txtar b/pkg/cmd/testdata/scripts/exclude.txtar index f0725e0d620..747a8d9e8cd 100644 --- a/pkg/cmd/testdata/scripts/exclude.txtar +++ b/pkg/cmd/testdata/scripts/exclude.txtar @@ -26,8 +26,9 @@ cmp stdout golden/diff-exclude-always.diff exclude = ["scripts"] -- golden/diff-exclude-always.diff -- diff --git a/script-once.sh b/script-once.sh -index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..d7dff6100cefc930f4161600c12b6f7ea37b7d3a 100755 ---- a/script-once.sh +new file mode 100755 +index 0000000000000000000000000000000000000000..d7dff6100cefc930f4161600c12b6f7ea37b7d3a +--- /dev/null +++ b/script-once.sh @@ -0,0 +1,3 @@ +#!/bin/sh @@ -58,8 +59,9 @@ index 0000000000000000000000000000000000000000..8a52cb9ce9551221716a53786ad74104 @@ -0,0 +1 @@ +# contents of .file diff --git a/script.sh b/script.sh -index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..3747a7ba08ee591c41b7c518e430d2802137eac4 100755 ---- a/script.sh +new file mode 100755 +index 0000000000000000000000000000000000000000..3747a7ba08ee591c41b7c518e430d2802137eac4 +--- /dev/null +++ b/script.sh @@ -0,0 +1,3 @@ +#!/bin/sh @@ -74,8 +76,9 @@ index 0000000000000000000000000000000000000000..8a52cb9ce9551221716a53786ad74104 @@ -0,0 +1 @@ +# contents of .file diff --git a/script.sh b/script.sh -index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..3747a7ba08ee591c41b7c518e430d2802137eac4 100755 ---- a/script.sh +new file mode 100755 +index 0000000000000000000000000000000000000000..3747a7ba08ee591c41b7c518e430d2802137eac4 +--- /dev/null +++ b/script.sh @@ -0,0 +1,3 @@ +#!/bin/sh diff --git a/pkg/cmd/testdata/scripts/issue-2510.txtar b/pkg/cmd/testdata/scripts/issue-2510.txtar index 5a7ecd1e27a..21d0338c34e 100644 --- a/pkg/cmd/testdata/scripts/issue-2510.txtar +++ b/pkg/cmd/testdata/scripts/issue-2510.txtar @@ -10,8 +10,9 @@ cmp stdout golden/diff2 -- golden/diff -- diff --git a/script-one.sh b/script-one.sh -index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a5498fa48acd6f616d60604b94352958c5e967fc 100755 ---- a/script-one.sh +new file mode 100755 +index 0000000000000000000000000000000000000000..a5498fa48acd6f616d60604b94352958c5e967fc +--- /dev/null +++ b/script-one.sh @@ -0,0 +1,3 @@ +#!/bin/sh @@ -19,8 +20,9 @@ index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a5498fa48acd6f616d60604b94352958 +echo "script one" -- golden/diff2 -- diff --git a/.chezmoiscripts/script-one.sh b/.chezmoiscripts/script-one.sh -index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a5498fa48acd6f616d60604b94352958c5e967fc 100755 ---- a/.chezmoiscripts/script-one.sh +new file mode 100755 +index 0000000000000000000000000000000000000000..a5498fa48acd6f616d60604b94352958c5e967fc +--- /dev/null +++ b/.chezmoiscripts/script-one.sh @@ -0,0 +1,3 @@ +#!/bin/sh diff --git a/pkg/cmd/testdata/scripts/script_unix.txtar b/pkg/cmd/testdata/scripts/script_unix.txtar index a17e70df408..8b572effbe6 100644 --- a/pkg/cmd/testdata/scripts/script_unix.txtar +++ b/pkg/cmd/testdata/scripts/script_unix.txtar @@ -41,8 +41,9 @@ cmp stdout golden/archive script.sh -- golden/diff.diff -- diff --git a/script.sh b/script.sh -index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f9103e018df1bbc178e66b46d8f133f49c85225d 100755 ---- a/script.sh +new file mode 100755 +index 0000000000000000000000000000000000000000..f9103e018df1bbc178e66b46d8f133f49c85225d +--- /dev/null +++ b/script.sh @@ -0,0 +1,3 @@ +#!/bin/sh diff --git a/pkg/cmd/testdata/scripts/scriptonce_unix.txtar b/pkg/cmd/testdata/scripts/scriptonce_unix.txtar index a329f84476f..4f1974105c4 100644 --- a/pkg/cmd/testdata/scripts/scriptonce_unix.txtar +++ b/pkg/cmd/testdata/scripts/scriptonce_unix.txtar @@ -40,8 +40,9 @@ stdout ${HOME@R} -- golden/diff.diff -- diff --git a/script.sh b/script.sh -index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f9103e018df1bbc178e66b46d8f133f49c85225d 100755 ---- a/script.sh +new file mode 100755 +index 0000000000000000000000000000000000000000..f9103e018df1bbc178e66b46d8f133f49c85225d +--- /dev/null +++ b/script.sh @@ -0,0 +1,3 @@ +#!/bin/sh
fix
Fix file hashes when showing scripts in diffs
75d6dae176e357e5dcd9dde8634cdf681a44785b
2021-01-23 22:30:19
Tom Payne
chore: Ignore whitespace errors in Hugo-generated files
false
diff --git a/internal/cmd/lint-whitespace/main.go b/internal/cmd/lint-whitespace/main.go index 6cacc203c3f..c1d8d41f36a 100644 --- a/internal/cmd/lint-whitespace/main.go +++ b/internal/cmd/lint-whitespace/main.go @@ -22,6 +22,7 @@ var ( regexp.MustCompile(`\Achezmoi2/completions/chezmoi\.ps1\z`), regexp.MustCompile(`\Acompletions/chezmoi\.ps1\z`), regexp.MustCompile(`\Achezmoi\.io/public\z`), + regexp.MustCompile(`\Achezmoi\.io/resources\z`), regexp.MustCompile(`\Achezmoi\.io/themes/book\z`), } crlfLineEndingRx = regexp.MustCompile(`\r\z`)
chore
Ignore whitespace errors in Hugo-generated files
758249eeb6db73a2b516a7afbe2a56972d94f0d5
2022-11-11 22:28:45
Tom Payne
feat: Remember HTTP username in URL in init command
false
diff --git a/assets/chezmoi.io/docs/reference/commands/init.md b/assets/chezmoi.io/docs/reference/commands/init.md index 28a575bcf44..5ccd0282a1e 100644 --- a/assets/chezmoi.io/docs/reference/commands/init.md +++ b/assets/chezmoi.io/docs/reference/commands/init.md @@ -7,13 +7,13 @@ By default, if *repo* is given, chezmoi will guess the full git repo URL, using HTTPS by default, or SSH if the `--ssh` option is specified, according to the following patterns: -| Pattern | HTTPS Repo | SSH repo | -| ------------------ | -------------------------------------- | ---------------------------------- | -| `user` | `https://github.com/user/dotfiles.git` | `[email protected]:user/dotfiles.git` | -| `user/repo` | `https://github.com/user/repo.git` | `[email protected]:user/repo.git` | -| `site/user/repo` | `https://site/user/repo.git` | `git@site:user/repo.git` | -| `sr.ht/~user` | `https://git.sr.ht/~user/dotfiles` | `[email protected]:~user/dotfiles.git` | -| `sr.ht/~user/repo` | `https://git.sr.ht/~user/repo` | `[email protected]:~user/repo.git` | +| Pattern | HTTPS Repo | SSH repo | +| ------------------ | ------------------------------------------- | ---------------------------------- | +| `user` | `https://[email protected]/user/dotfiles.git` | `[email protected]:user/dotfiles.git` | +| `user/repo` | `https://[email protected]/user/repo.git` | `[email protected]:user/repo.git` | +| `site/user/repo` | `https://user@site/user/repo.git` | `git@site:user/repo.git` | +| `sr.ht/~user` | `https://[email protected]/~user/dotfiles` | `[email protected]:~user/dotfiles.git` | +| `sr.ht/~user/repo` | `https://[email protected]/~user/repo` | `[email protected]:~user/repo.git` | To disable git repo URL guessing pass the `--guess-repo-url=false` option. diff --git a/pkg/cmd/initcmd.go b/pkg/cmd/initcmd.go index 85cc63d18ed..8fb3323205f 100644 --- a/pkg/cmd/initcmd.go +++ b/pkg/cmd/initcmd.go @@ -45,49 +45,49 @@ var dotfilesRepoGuesses = []struct { }{ { rx: regexp.MustCompile(`\A([-0-9A-Za-z]+)\z`), - httpRepoGuessRepl: "https://github.com/$1/dotfiles.git", + httpRepoGuessRepl: "https://[email protected]/$1/dotfiles.git", httpUsernameGuessRepl: "$1", sshRepoGuessRepl: "[email protected]:$1/dotfiles.git", }, { rx: regexp.MustCompile(`\A([-0-9A-Za-z]+)/([-0-9A-Za-z]+)(\.git)?\z`), - httpRepoGuessRepl: "https://github.com/$1/$2.git", + httpRepoGuessRepl: "https://[email protected]/$1/$2.git", httpUsernameGuessRepl: "$1", sshRepoGuessRepl: "[email protected]:$1/$2.git", }, { rx: regexp.MustCompile(`\A([-.0-9A-Za-z]+)/([-0-9A-Za-z]+)\z`), - httpRepoGuessRepl: "https://$1/$2/dotfiles.git", + httpRepoGuessRepl: "https://$2@$1/$2/dotfiles.git", httpUsernameGuessRepl: "$2", sshRepoGuessRepl: "git@$1:$2/dotfiles.git", }, { rx: regexp.MustCompile(`\A([-0-9A-Za-z]+)/([-0-9A-Za-z]+)/([-.0-9A-Za-z]+)\z`), - httpRepoGuessRepl: "https://$1/$2/$3.git", + httpRepoGuessRepl: "https://$2@$1/$2/$3.git", httpUsernameGuessRepl: "$2", sshRepoGuessRepl: "git@$1:$2/$3.git", }, { rx: regexp.MustCompile(`\A([-.0-9A-Za-z]+)/([-0-9A-Za-z]+)/([-0-9A-Za-z]+)(\.git)?\z`), - httpRepoGuessRepl: "https://$1/$2/$3.git", + httpRepoGuessRepl: "https://$2@$1/$2/$3.git", httpUsernameGuessRepl: "$2", sshRepoGuessRepl: "git@$1:$2/$3.git", }, { rx: regexp.MustCompile(`\A(https?://)([-.0-9A-Za-z]+)/([-0-9A-Za-z]+)/([-0-9A-Za-z]+)(\.git)?\z`), - httpRepoGuessRepl: "$1$2/$3/$4.git", + httpRepoGuessRepl: "$1$3@$2/$3/$4.git", httpUsernameGuessRepl: "$3", sshRepoGuessRepl: "git@$2:$3/$4.git", }, { rx: regexp.MustCompile(`\Asr\.ht/~([-0-9A-Za-z]+)\z`), - httpRepoGuessRepl: "https://git.sr.ht/~$1/dotfiles", + httpRepoGuessRepl: "https://[email protected]/~$1/dotfiles", httpUsernameGuessRepl: "$1", sshRepoGuessRepl: "[email protected]:~$1/dotfiles", }, { rx: regexp.MustCompile(`\Asr\.ht/~([-0-9A-Za-z]+)/([-0-9A-Za-z]+)\z`), - httpRepoGuessRepl: "https://git.sr.ht/~$1/$2", + httpRepoGuessRepl: "https://[email protected]/~$1/$2", httpUsernameGuessRepl: "$1", sshRepoGuessRepl: "[email protected]:~$1/$2", }, diff --git a/pkg/cmd/initcmd_test.go b/pkg/cmd/initcmd_test.go index 0e69c0cbe0e..b631dd919cd 100644 --- a/pkg/cmd/initcmd_test.go +++ b/pkg/cmd/initcmd_test.go @@ -26,73 +26,73 @@ func TestGuessDotfilesRepoURL(t *testing.T) { }, { arg: "codeberg.org/user", - expectedHTTPRepoURL: "https://codeberg.org/user/dotfiles.git", + expectedHTTPRepoURL: "https://[email protected]/user/dotfiles.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "[email protected]:user/dotfiles.git", }, { arg: "codeberg.org/user/dots", - expectedHTTPRepoURL: "https://codeberg.org/user/dots.git", + expectedHTTPRepoURL: "https://[email protected]/user/dots.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "[email protected]:user/dots.git", }, { arg: "gitlab.com/user", - expectedHTTPRepoURL: "https://gitlab.com/user/dotfiles.git", + expectedHTTPRepoURL: "https://[email protected]/user/dotfiles.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "[email protected]:user/dotfiles.git", }, { arg: "gitlab.com/user/dots", - expectedHTTPRepoURL: "https://gitlab.com/user/dots.git", + expectedHTTPRepoURL: "https://[email protected]/user/dots.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "[email protected]:user/dots.git", }, { arg: "gitlab.com/user/dots.git", - expectedHTTPRepoURL: "https://gitlab.com/user/dots.git", + expectedHTTPRepoURL: "https://[email protected]/user/dots.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "[email protected]:user/dots.git", }, { arg: "http://gitlab.com/user/dots.git", - expectedHTTPRepoURL: "http://gitlab.com/user/dots.git", + expectedHTTPRepoURL: "http://[email protected]/user/dots.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "[email protected]:user/dots.git", }, { arg: "https://gitlab.com/user/dots.git", - expectedHTTPRepoURL: "https://gitlab.com/user/dots.git", + expectedHTTPRepoURL: "https://[email protected]/user/dots.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "[email protected]:user/dots.git", }, { arg: "sr.ht/~user", - expectedHTTPRepoURL: "https://git.sr.ht/~user/dotfiles", + expectedHTTPRepoURL: "https://[email protected]/~user/dotfiles", expectedHTTPUsername: "user", expectedSSHRepoURL: "[email protected]:~user/dotfiles", }, { arg: "sr.ht/~user/dots", - expectedHTTPRepoURL: "https://git.sr.ht/~user/dots", + expectedHTTPRepoURL: "https://[email protected]/~user/dots", expectedHTTPUsername: "user", expectedSSHRepoURL: "[email protected]:~user/dots", }, { arg: "user", - expectedHTTPRepoURL: "https://github.com/user/dotfiles.git", + expectedHTTPRepoURL: "https://[email protected]/user/dotfiles.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "[email protected]:user/dotfiles.git", }, { arg: "user/dots", - expectedHTTPRepoURL: "https://github.com/user/dots.git", + expectedHTTPRepoURL: "https://[email protected]/user/dots.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "[email protected]:user/dots.git", }, { arg: "user/dots.git", - expectedHTTPRepoURL: "https://github.com/user/dots.git", + expectedHTTPRepoURL: "https://[email protected]/user/dots.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "[email protected]:user/dots.git", },
feat
Remember HTTP username in URL in init command
42413936a55233df343d65384c49fd6965591bf1
2024-07-02 01:27:06
Tom Payne
feat: Allow private_ and readonly_ attrs to be set for externals
false
diff --git a/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiexternal-format.md b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiexternal-format.md index 585c0acb646..1e085c5d8c2 100644 --- a/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiexternal-format.md +++ b/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiexternal-format.md @@ -26,6 +26,8 @@ Entries may have the following fields: | `exact` | bool | `false` | Add `exact_` attribute to directories in archive | | `exclude` | []string | *none* | Patterns to exclude from archive | | `executable` | bool | `false` | Add `executable_` attribute to file | +| `private` | bool | `false` | Add `private_` attribute to file | +| `readonly` | bool | `false` | Add `readonly_` attribute to file | | `format` | string | *autodetect* | Format of archive | | `path` | string | *none* | Path to file in archive | | `include` | []string | *none* | Patterns to include from archive | diff --git a/internal/chezmoi/sourcestate.go b/internal/chezmoi/sourcestate.go index 0e2b905b99c..e80bfb56cf4 100644 --- a/internal/chezmoi/sourcestate.go +++ b/internal/chezmoi/sourcestate.go @@ -92,6 +92,8 @@ type External struct { Encrypted bool `json:"encrypted" toml:"encrypted" yaml:"encrypted"` Exact bool `json:"exact" toml:"exact" yaml:"exact"` Executable bool `json:"executable" toml:"executable" yaml:"executable"` + Private bool `json:"private" toml:"private" yaml:"private"` + ReadOnly bool `json:"readonly" toml:"readonly" yaml:"readonly"` Checksum externalChecksum `json:"checksum" toml:"checksum" yaml:"checksum"` Clone externalClone `json:"clone" toml:"clone" yaml:"clone"` Exclude []string `json:"exclude" toml:"exclude" yaml:"exclude"` @@ -2489,8 +2491,8 @@ func (s *SourceState) readExternalArchiveFile( Type: SourceFileTypeFile, Empty: fileInfo.Size() == 0, Executable: IsExecutable(fileInfo) || external.Executable, - Private: isPrivate(fileInfo), - ReadOnly: isReadOnly(fileInfo), + Private: isPrivate(fileInfo) || external.Private, + ReadOnly: isReadOnly(fileInfo) || external.ReadOnly, } sourceRelPath := parentSourceRelPath.Join(NewSourceRelPath(fileAttr.SourceName(s.encryption.EncryptedSuffix()))) targetStateEntry := &TargetStateFile{ @@ -2652,6 +2654,8 @@ func (s *SourceState) readExternalFile( fileAttr := FileAttr{ Empty: true, Executable: external.Executable, + Private: external.Private, + ReadOnly: external.ReadOnly, } targetStateEntry := &TargetStateFile{ lazyContents: lazyContents, diff --git a/internal/cmd/testdata/scripts/external.txtar b/internal/cmd/testdata/scripts/external.txtar index 6e14a26ec80..ece0b9a08ec 100644 --- a/internal/cmd/testdata/scripts/external.txtar +++ b/internal/cmd/testdata/scripts/external.txtar @@ -125,6 +125,12 @@ cmp $HOME/.file golden/dir/file [darwin] exec chezmoi managed --include=externals [darwin] cmp stdout golden/managed-appledouble +chhome home16/user + +# test that readonly and private attributes are set +[!windows] exec chezmoi apply +[!windows] cmpmod 400 $HOME/.file + -- archive/dir/file -- # contents of dir/file -- golden/.file -- @@ -193,6 +199,12 @@ cmp $HOME/.file golden/dir/file archive: extractAppleDoubleFiles: true stripComponents: 1 +-- home16/user/.local/share/chezmoi/.chezmoiexternal.toml -- +[".file"] + type = "file" + url = "{{ env "HTTPD_URL" }}/.file" + private = true + readonly = true -- home2/user/.local/share/chezmoi/.chezmoiexternal.toml -- [".file"] type = "file"
feat
Allow private_ and readonly_ attrs to be set for externals
4e6b84382e02e898989ede87ee422f29f4b85fef
2022-03-17 05:54:30
Tom Payne
feat: Build for s390x architecture
false
diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 5ad5d1716a7..dd51131538b 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -54,6 +54,7 @@ builds: - arm64 - ppc64 - ppc64le + - s390x goarm: - "" ldflags: diff --git a/assets/chezmoi.io/docs/install.md.tmpl b/assets/chezmoi.io/docs/install.md.tmpl index efbb819b45a..537f832b616 100644 --- a/assets/chezmoi.io/docs/install.md.tmpl +++ b/assets/chezmoi.io/docs/install.md.tmpl @@ -148,19 +148,19 @@ Download a package for your distribution and architecture. === "deb" -{{ range $arch := list "amd64" "arm64" "armel" "i386" "ppc64" "ppc64le" }} +{{ range $arch := list "amd64" "arm64" "armel" "i386" "ppc64" "ppc64le" "s390x" }} [`{{ $arch }}`](https://github.com/twpayne/chezmoi/releases/download/v{{ $version }}/chezmoi_{{ $version }}_linux_{{ $arch }}.deb) {{- end }} === "rpm" -{{ range $arch := list "aarch64" "armhfp" "i686" "ppc64" "ppc64le" "x86_64" }} +{{ range $arch := list "aarch64" "armhfp" "i686" "ppc64" "ppc64le" "s390x" "x86_64" }} [`{{ $arch }}`](https://github.com/twpayne/chezmoi/releases/download/v{{ $version }}/chezmoi-{{ $version }}-{{ $arch }}.rpm) {{- end }} === "apk" -{{ range $arch := list "386" "amd64" "arm" "arm64" "ppc64" "ppc64le" }} +{{ range $arch := list "386" "amd64" "arm" "arm64" "ppc64" "ppc64le" "s390x" }} [`{{ $arch }}`](https://github.com/twpayne/chezmoi/releases/download/v{{ $version }}/chezmoi_{{ $version }}_linux_{{ $arch }}.apk) {{- end }} @@ -171,7 +171,7 @@ pre-built binary and shell completions. === "Linux" -{{ range $arch := list "amd64" "arm" "arm64" "i386" "ppc64" "ppc64le" }} +{{ range $arch := list "amd64" "arm" "arm64" "i386" "ppc64" "ppc64le" "s390x" }} [`{{ $arch }}`](https://github.com/twpayne/chezmoi/releases/download/v{{ $version }}/chezmoi_{{ $version }}_linux_{{ $arch }}.tar.gz) {{- end }} [`amd64` (glibc)](https://github.com/twpayne/chezmoi/releases/download/v{{ $version }}/chezmoi_{{ $version }}_linux-glibc_amd64.tar.gz) diff --git a/assets/scripts/install.sh b/assets/scripts/install.sh index 4107faf1a1f..5e321284d01 100644 --- a/assets/scripts/install.sh +++ b/assets/scripts/install.sh @@ -164,6 +164,7 @@ check_goos_goarch() { linux/arm64) return 0 ;; linux/ppc64) return 0 ;; linux/ppc64le) return 0 ;; + linux/s390x) return 0 ;; openbsd/386) return 0 ;; openbsd/amd64) return 0 ;; openbsd/arm) return 0 ;;
feat
Build for s390x architecture
5201ddc1d71f0d62e2b5af9abe31589ca1da4816
2024-02-23 00:13:28
Tom Payne
fix: Don't leak internal default sentinel values in template data
false
diff --git a/internal/cmd/config.go b/internal/cmd/config.go index ae496cf0de5..a5093ab85d3 100644 --- a/internal/cmd/config.go +++ b/internal/cmd/config.go @@ -2775,8 +2775,15 @@ func newConfigFile(bds *xdg.BaseDirectorySpecification) ConfigFile { } func (f *ConfigFile) toMap() map[string]any { + // Make a copy of f and replace any default sentinels with the empty string + // to ensure that there are no default sentinels in the result. + configFile := *f + if configFile.Diff.Pager == defaultSentinel { + configFile.Diff.Pager = "" + } + var result map[string]any - if err := mapstructure.Decode(f, &result); err != nil { + if err := mapstructure.Decode(configFile, &result); err != nil { panic(err) } return result diff --git a/internal/cmd/testdata/scripts/issue3590.txtar b/internal/cmd/testdata/scripts/issue3590.txtar new file mode 100644 index 00000000000..75a83cf807b --- /dev/null +++ b/internal/cmd/testdata/scripts/issue3590.txtar @@ -0,0 +1,3 @@ +# test that chezmoi data does not include default sentinels +exec chezmoi data +! stdout '"\\u0000"'
fix
Don't leak internal default sentinel values in template data
cdd4f1664ab324e171825a9644ab37eff0608eb5
2023-09-18 23:55:14
Tom Payne
fix: Use diff pager for all diff output if configured
false
diff --git a/internal/chezmoilog/chezmoilog.go b/internal/chezmoilog/chezmoilog.go index 51656e36542..c78eae9cb02 100644 --- a/internal/chezmoilog/chezmoilog.go +++ b/internal/chezmoilog/chezmoilog.go @@ -168,6 +168,30 @@ func LogCmdRun(cmd *exec.Cmd) error { return err } +// LogCmdStart calls cmd.Start, logs the result, and returns the result. +func LogCmdStart(cmd *exec.Cmd) error { + start := time.Now() + err := cmd.Start() + log.Err(err). + EmbedObject(OSExecCmdLogObject{Cmd: cmd}). + EmbedObject(OSExecExitErrorLogObject{Err: err}). + Time("start", start). + Msg("Start") + return err +} + +// LogCmdWait calls cmd.Wait, logs the result, and returns the result. +func LogCmdWait(cmd *exec.Cmd) error { + err := cmd.Wait() + end := time.Now() + log.Err(err). + EmbedObject(OSExecCmdLogObject{Cmd: cmd}). + EmbedObject(OSExecExitErrorLogObject{Err: err}). + Time("end", end). + Msg("Wait") + return err +} + // Output returns the first few bytes of output if err is nil, otherwise it // returns the full output. func Output(data []byte, err error) []byte { diff --git a/internal/cmd/annotation.go b/internal/cmd/annotation.go index 48b47414860..1b866e7f08e 100644 --- a/internal/cmd/annotation.go +++ b/internal/cmd/annotation.go @@ -5,9 +5,11 @@ import "github.com/spf13/cobra" // Annotations. var ( createSourceDirectoryIfNeeded = tagAnnotation("chezmoi_create_source_directory_if_needed") + dryRun = tagAnnotation("chezmoi_dry_run") modifiesConfigFile = tagAnnotation("chezmoi_modifies_config_file") modifiesDestinationDirectory = tagAnnotation("chezmoi_modifies_destination_directory") modifiesSourceDirectory = tagAnnotation("chezmoi_modifies_source_directory") + outputsDiff = tagAnnotation("chezmoi_outputs_diff") requiresConfigDirectory = tagAnnotation("chezmoi_requires_config_directory") requiresSourceDirectory = tagAnnotation("chezmoi_requires_source_directory") requiresWorkingTree = tagAnnotation("chezmoi_requires_working_tree") diff --git a/internal/cmd/config.go b/internal/cmd/config.go index 314488295a7..fc13d2358c3 100644 --- a/internal/cmd/config.go +++ b/internal/cmd/config.go @@ -234,10 +234,12 @@ type Config struct { templateData *templateData runEnv []string - stdin io.Reader - stdout io.Writer - stderr io.Writer - bufioReader *bufio.Reader + stdin io.Reader + stdout io.Writer + stderr io.Writer + bufioReader *bufio.Reader + diffPagerCmdStdin io.WriteCloser + diffPagerCmd *exec.Cmd tempDirs map[string]chezmoi.AbsPath @@ -1286,6 +1288,45 @@ func (c *Config) findConfigTemplate() (*configTemplate, error) { } } +// getDiffPager returns the pager for diff output. +func (c *Config) getDiffPager() string { + switch { + case c.noPager: + return "" + case c.Diff.Pager != defaultSentinel: + return c.Diff.Pager + default: + return c.Pager + } +} + +// getDiffPagerCmd returns a command to run the diff pager, or nil if there is +// no diff pager configured. +func (c *Config) getDiffPagerCmd() (*exec.Cmd, error) { + pager := c.getDiffPager() + if pager == "" { + return nil, nil + } + + // If the pager command contains any spaces, assume that it is a full + // shell command to be executed via the user's shell. Otherwise, execute + // it directly. + var pagerCmd *exec.Cmd + if strings.IndexFunc(pager, unicode.IsSpace) != -1 { + shellCommand, _ := shell.CurrentUserShell() + shellCommand, shellArgs, err := parseCommand(shellCommand, []string{"-c", pager}) + if err != nil { + return nil, err + } + pagerCmd = exec.Command(shellCommand, shellArgs...) + } else { + pagerCmd = exec.Command(pager) + } + pagerCmd.Stdout = c.stdout + pagerCmd.Stderr = c.stderr + return pagerCmd, nil +} + func (c *Config) getHTTPClient() (*http.Client, error) { if c.httpClient != nil { return c.httpClient, nil @@ -1685,6 +1726,16 @@ func (c *Config) persistentPostRunRootE(cmd *cobra.Command, args []string) error return err } + // Wait for any diff pager process to terminate. + if c.diffPagerCmd != nil { + if err := c.diffPagerCmdStdin.Close(); err != nil { + return err + } + if err := chezmoilog.LogCmdWait(c.diffPagerCmd); err != nil { + return err + } + } + if annotations.hasTag(modifiesConfigFile) { configFileContents, err := c.baseSystem.ReadFile(c.configFileAbsPath) switch { @@ -1746,35 +1797,15 @@ func (c *Config) persistentPostRunRootE(cmd *cobra.Command, args []string) error // pageDiffOutput pages the diff output to stdout. func (c *Config) pageDiffOutput(output string) error { - pager := c.Diff.Pager - switch { - case c.noPager: - pager = "" - case pager == defaultSentinel: - pager = c.Pager // Use default pager. - } - if pager == "" { + switch pagerCmd, err := c.getDiffPagerCmd(); { + case err != nil: + return err + case pagerCmd == nil: return c.writeOutputString(output) + default: + pagerCmd.Stdin = bytes.NewBufferString(output) + return chezmoilog.LogCmdRun(pagerCmd) } - - // If the pager command contains any spaces, assume that it is a full - // shell command to be executed via the user's shell. Otherwise, execute - // it directly. - var pagerCmd *exec.Cmd - if strings.IndexFunc(pager, unicode.IsSpace) != -1 { - shellCommand, _ := shell.CurrentUserShell() - shellCommand, shellArgs, err := parseCommand(shellCommand, []string{"-c", pager}) - if err != nil { - return err - } - pagerCmd = exec.Command(shellCommand, shellArgs...) - } else { - pagerCmd = exec.Command(pager) - } - pagerCmd.Stdin = bytes.NewBufferString(output) - pagerCmd.Stdout = c.stdout - pagerCmd.Stderr = c.stderr - return chezmoilog.LogCmdRun(pagerCmd) } // persistentPreRunRootE performs pre-run actions for the root command. @@ -1951,13 +1982,31 @@ func (c *Config) persistentPreRunRootE(cmd *cobra.Command, args []string) error if !annotations.hasTag(modifiesSourceDirectory) { c.sourceSystem = chezmoi.NewReadOnlySystem(c.sourceSystem) } - if c.dryRun { + if c.dryRun || annotations.hasTag(dryRun) { c.sourceSystem = chezmoi.NewDryRunSystem(c.sourceSystem) c.destSystem = chezmoi.NewDryRunSystem(c.destSystem) } - if c.Verbose { - c.sourceSystem = c.newDiffSystem(c.sourceSystem, c.stdout, c.SourceDirAbsPath) - c.destSystem = c.newDiffSystem(c.destSystem, c.stdout, c.DestDirAbsPath) + if c.Verbose || annotations.hasTag(outputsDiff) { + // If the user has configured a diff pager, then start it as a process. + // Otherwise, write the diff output directly to stdout. + var writer io.Writer + switch pagerCmd, err := c.getDiffPagerCmd(); { + case err != nil: + return err + case pagerCmd == nil: + writer = c.stdout + default: + pipeReader, pipeWriter := io.Pipe() + pagerCmd.Stdin = pipeReader + if err := chezmoilog.LogCmdStart(pagerCmd); err != nil { + return err + } + writer = pipeWriter + c.diffPagerCmd = pagerCmd + c.diffPagerCmdStdin = pipeWriter + } + c.sourceSystem = c.newDiffSystem(c.sourceSystem, writer, c.SourceDirAbsPath) + c.destSystem = c.newDiffSystem(c.destSystem, writer, c.DestDirAbsPath) } if err := c.setEncryption(); err != nil { diff --git a/internal/cmd/diffcmd.go b/internal/cmd/diffcmd.go index f1e094647e5..9c965b3c701 100644 --- a/internal/cmd/diffcmd.go +++ b/internal/cmd/diffcmd.go @@ -1,8 +1,6 @@ package cmd import ( - "strings" - "github.com/spf13/cobra" "github.com/twpayne/chezmoi/v2/internal/chezmoi" @@ -30,6 +28,8 @@ func (c *Config) newDiffCmd() *cobra.Command { ValidArgsFunction: c.targetValidArgs, RunE: c.runDiffCmd, Annotations: newAnnotations( + dryRun, + outputsDiff, persistentStateModeReadMockWrite, requiresSourceDirectory, ), @@ -68,27 +68,11 @@ func (c *Config) newDiffCmd() *cobra.Command { } func (c *Config) runDiffCmd(cmd *cobra.Command, args []string) (err error) { - builder := &strings.Builder{} - dryRunSystem := chezmoi.NewDryRunSystem(c.destSystem) - diffSystem := c.newDiffSystem(dryRunSystem, builder, c.DestDirAbsPath) - if err = c.applyArgs(cmd.Context(), diffSystem, c.DestDirAbsPath, args, applyArgsOptions{ + return c.applyArgs(cmd.Context(), c.destSystem, c.DestDirAbsPath, args, applyArgsOptions{ cmd: cmd, filter: chezmoi.NewEntryTypeFilter(c.Diff.include.Bits(), c.Diff.Exclude.Bits()), init: c.Diff.init, recursive: c.Diff.recursive, umask: c.Umask, - }); err != nil { - return - } - if err = c.pageDiffOutput(builder.String()); err != nil { - return - } - if closer, ok := diffSystem.(interface { - Close() error - }); ok { - if err = closer.Close(); err != nil { - return - } - } - return + }) } diff --git a/internal/cmd/mergeallcmd.go b/internal/cmd/mergeallcmd.go index c4c9a47cdae..a01082999c6 100644 --- a/internal/cmd/mergeallcmd.go +++ b/internal/cmd/mergeallcmd.go @@ -21,6 +21,7 @@ func (c *Config) newMergeAllCmd() *cobra.Command { Example: example("merge-all"), RunE: c.runMergeAllCmd, Annotations: newAnnotations( + dryRun, modifiesSourceDirectory, requiresSourceDirectory, ), @@ -41,7 +42,6 @@ func (c *Config) newMergeAllCmd() *cobra.Command { func (c *Config) runMergeAllCmd(cmd *cobra.Command, args []string) error { var targetRelPaths []chezmoi.RelPath - dryRunSystem := chezmoi.NewDryRunSystem(c.destSystem) preApplyFunc := func( targetRelPath chezmoi.RelPath, targetEntryState, lastWrittenEntryState, actualEntryState *chezmoi.EntryState, ) error { @@ -51,7 +51,7 @@ func (c *Config) runMergeAllCmd(cmd *cobra.Command, args []string) error { } return fs.SkipDir } - if err := c.applyArgs(cmd.Context(), dryRunSystem, c.DestDirAbsPath, args, applyArgsOptions{ + if err := c.applyArgs(cmd.Context(), c.destSystem, c.DestDirAbsPath, args, applyArgsOptions{ cmd: cmd, filter: chezmoi.NewEntryTypeFilter(chezmoi.EntryTypesAll, chezmoi.EntryTypesNone), init: c.mergeAll.init, diff --git a/internal/cmd/statuscmd.go b/internal/cmd/statuscmd.go index 139396c0db0..83bee626434 100644 --- a/internal/cmd/statuscmd.go +++ b/internal/cmd/statuscmd.go @@ -27,6 +27,7 @@ func (c *Config) newStatusCmd() *cobra.Command { ValidArgsFunction: c.targetValidArgs, RunE: c.runStatusCmd, Annotations: newAnnotations( + dryRun, modifiesDestinationDirectory, persistentStateModeReadMockWrite, requiresSourceDirectory, @@ -53,7 +54,6 @@ func (c *Config) newStatusCmd() *cobra.Command { func (c *Config) runStatusCmd(cmd *cobra.Command, args []string) error { builder := strings.Builder{} - dryRunSystem := chezmoi.NewDryRunSystem(c.destSystem) preApplyFunc := func( targetRelPath chezmoi.RelPath, targetEntryState, lastWrittenEntryState, actualEntryState *chezmoi.EntryState, ) error { @@ -93,7 +93,7 @@ func (c *Config) runStatusCmd(cmd *cobra.Command, args []string) error { } return fs.SkipDir } - if err := c.applyArgs(cmd.Context(), dryRunSystem, c.DestDirAbsPath, args, applyArgsOptions{ + if err := c.applyArgs(cmd.Context(), c.destSystem, c.DestDirAbsPath, args, applyArgsOptions{ cmd: cmd, filter: chezmoi.NewEntryTypeFilter(c.Status.include.Bits(), c.Status.Exclude.Bits()), init: c.Status.init, diff --git a/internal/cmd/testdata/scripts/issue3240.txtar b/internal/cmd/testdata/scripts/issue3240.txtar new file mode 100644 index 00000000000..ea7bd5e1eba --- /dev/null +++ b/internal/cmd/testdata/scripts/issue3240.txtar @@ -0,0 +1,26 @@ +[windows] skip 'UNIX only' + +chmod 777 bin/custom-pager + +# test that chezmoi diff uses the custom pager if set +exec chezmoi diff +cmp stdout golden/stdout + +# test that chezmoi diff --verbose has identical output +exec chezmoi diff --verbose +cmp stdout golden/stdout + +# test that chezmoi apply uses the custom pager if set +exec chezmoi apply --dry-run --verbose +stdout custom-pager + +-- bin/custom-pager -- +#!/bin/sh + +echo custom-pager +-- golden/stdout -- +custom-pager +-- home/user/.config/chezmoi/chezmoi.toml -- +pager = "custom-pager" +-- home/user/.local/share/chezmoi/dot_file -- +# contents of .file
fix
Use diff pager for all diff output if configured
881cb7e781d40c90d46f868ce63cda2f143d8282
2022-02-24 19:20:22
Scott Thomas
fix: Correctly cut hostname off at . character
false
diff --git a/pkg/cmd/config.go b/pkg/cmd/config.go index 750d7c83aa7..d5a6812fa91 100644 --- a/pkg/cmd/config.go +++ b/pkg/cmd/config.go @@ -920,7 +920,7 @@ func (c *Config) defaultTemplateData() map[string]interface{} { var hostname string if rawHostname, err := os.Hostname(); err == nil { - hostname, _, _ = chezmoi.CutString(rawHostname, "=") + hostname, _, _ = chezmoi.CutString(rawHostname, ".") } else { c.logger.Info(). Err(err).
fix
Correctly cut hostname off at . character
2ed6d301e9c1df0a939984534d8bde1b17249492
2022-11-03 02:16:30
Braden Hilton
docs: Add line endings directive documentation
false
diff --git a/assets/chezmoi.io/docs/reference/templates/directives.md b/assets/chezmoi.io/docs/reference/templates/directives.md index 0a3b2c06dea..4d17eed20a6 100644 --- a/assets/chezmoi.io/docs/reference/templates/directives.md +++ b/assets/chezmoi.io/docs/reference/templates/directives.md @@ -37,6 +37,23 @@ inherited by templates called from the file. # [[ "true" ]] ``` +## Line endings + +Many of the template functions available in chezmoi primarily use UNIX-syle +line endings (`lf`/`\n`), which may result in unexpected output when running +`chezmoi diff` on a `modify_` template. These line endings can be overridden +with a template directive: + + chezmoi:template:line-endings=$VALUE + +`$VALUE` can be an arbitrary string or one of: + +| Value | Effect | +| -------- | --------------------------------------------------------------------- | +| `crlf` | Use Windows line endings (`\r\n`). | +| `lf` | Use UNIX-style line endings (`\n`). | +| `native` | Use platform-native line endings (`crlf` on Windows, `lf` elsewhere). | + ## Missing keys By default, chezmoi will return an error if a template indexes a map with a key
docs
Add line endings directive documentation
c4680a82f1c441209bd9d79078fa8ba7094619e5
2023-02-17 16:49:43
Tom Payne
chore: Update dependencies
false
diff --git a/go.mod b/go.mod index 876a03c99e7..fa06faa8d28 100644 --- a/go.mod +++ b/go.mod @@ -6,8 +6,8 @@ require ( filippo.io/age v1.1.1 github.com/Masterminds/sprig/v3 v3.2.3 github.com/aws/aws-sdk-go-v2 v1.17.4 - github.com/aws/aws-sdk-go-v2/config v1.18.12 - github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.18.3 + github.com/aws/aws-sdk-go-v2/config v1.18.13 + github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.18.4 github.com/bmatcuk/doublestar/v4 v4.6.0 github.com/bradenhilton/mozillainstallhash v1.0.0 github.com/charmbracelet/bubbles v0.15.0 @@ -54,19 +54,19 @@ require ( github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.2.0 // indirect github.com/Microsoft/go-winio v0.6.0 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20230201104953-d1d05f4e2bfb // indirect + github.com/ProtonMail/go-crypto v0.0.0-20230214155104-81033d7f4442 // indirect github.com/acomagu/bufpipe v1.0.3 // indirect github.com/alecthomas/chroma v0.10.0 // indirect github.com/alessio/shellescape v1.4.1 // indirect github.com/atotto/clipboard v0.1.4 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.12 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.13 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.22 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.28 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.22 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.29 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.22 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.12.1 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.12.2 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.2 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.18.3 // indirect github.com/aws/smithy-go v1.13.5 // indirect github.com/aymanbagabas/go-osc52 v1.2.1 // indirect @@ -119,7 +119,7 @@ require ( github.com/yuin/goldmark-emoji v1.0.1 // indirect go.uber.org/atomic v1.10.0 // indirect golang.org/x/mod v0.8.0 // indirect - golang.org/x/net v0.6.0 // indirect + golang.org/x/net v0.7.0 // indirect golang.org/x/text v0.7.0 // indirect golang.org/x/tools v0.6.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/go.sum b/go.sum index dfc4333182a..17be7124d4c 100644 --- a/go.sum +++ b/go.sum @@ -12,8 +12,8 @@ github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4/go.mod h1:UBYPn8k0D56RtnR8RFQMjmh4KrZzWJ5o7Z9SYjossQ8= -github.com/ProtonMail/go-crypto v0.0.0-20230201104953-d1d05f4e2bfb h1:Vx1Bw/nGULx+FuY7Sw+8ZDpOx9XOdA+mOfo678SqkbU= -github.com/ProtonMail/go-crypto v0.0.0-20230201104953-d1d05f4e2bfb/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= +github.com/ProtonMail/go-crypto v0.0.0-20230214155104-81033d7f4442 h1:OUJ54Fkd+AQXYmr9eOUxZfWNzpK3/e/KD40qa2rKHS4= +github.com/ProtonMail/go-crypto v0.0.0-20230214155104-81033d7f4442/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= @@ -28,10 +28,10 @@ github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/aws-sdk-go-v2 v1.17.4 h1:wyC6p9Yfq6V2y98wfDsj6OnNQa4w2BLGCLIxzNhwOGY= github.com/aws/aws-sdk-go-v2 v1.17.4/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= -github.com/aws/aws-sdk-go-v2/config v1.18.12 h1:fKs/I4wccmfrNRO9rdrbMO1NgLxct6H9rNMiPdBxHWw= -github.com/aws/aws-sdk-go-v2/config v1.18.12/go.mod h1:J36fOhj1LQBr+O4hJCiT8FwVvieeoSGOtPuvhKlsNu8= -github.com/aws/aws-sdk-go-v2/credentials v1.13.12 h1:Cb+HhuEnV19zHRaYYVglwvdHGMJWbdsyP4oHhw04xws= -github.com/aws/aws-sdk-go-v2/credentials v1.13.12/go.mod h1:37HG2MBroXK3jXfxVGtbM2J48ra2+Ltu+tmwr/jO0KA= +github.com/aws/aws-sdk-go-v2/config v1.18.13 h1:v0xlYqbO6/EVlM8tUn2QEOA7btQxcgidEq2JRDBPTho= +github.com/aws/aws-sdk-go-v2/config v1.18.13/go.mod h1:r39wGSZB7wPDW1i54JyQXUpc5KsWjh5z/3S5D9eCqDg= +github.com/aws/aws-sdk-go-v2/credentials v1.13.13 h1:zw1KAc1kl00NYd3ofVmFrb09qnYlSQMeh+fmlQRAihI= +github.com/aws/aws-sdk-go-v2/credentials v1.13.13/go.mod h1:DW9nbIIF9MrIja0cBQrUpeWYQMSlNmP8fevLUyF9W38= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.22 h1:3aMfcTmoXtTZnaT86QlVaYh+BRMbvrrmZwIQ5jWqCZQ= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.22/go.mod h1:YGSIJyQ6D6FjKMQh16hVFSIUD54L4F7zTGePqYMYYJU= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.28 h1:r+XwaCLpIvCKjBIYy/HVZujQS9tsz5ohHG3ZIe0wKoE= @@ -42,12 +42,12 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.3.29 h1:J4xhFd6zHhdF9jPP0FQJ6WknzBb github.com/aws/aws-sdk-go-v2/internal/ini v1.3.29/go.mod h1:TwuqRBGzxjQJIwH16/fOZodwXt2Zxa9/cwJC5ke4j7s= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.22 h1:LjFQf8hFuMO22HkV5VWGLBvmCLBCLPivUAmpdpnp4Vs= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.22/go.mod h1:xt0Au8yPIwYXf/GYPy/vl4K3CgwhfQMYbrH7DlUUIws= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.18.3 h1:Zod/h9QcDvbrrG3jjTUp4lctRb6Qg2nj7ARC/xMsUc4= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.18.3/go.mod h1:hqPcyOuLU6yWIbLy3qMnQnmidgKuIEwqIlW6+chYnog= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.1 h1:lQKN/LNa3qqu2cDOQZybP7oL4nMGGiFqob0jZJaR8/4= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.1/go.mod h1:IgV8l3sj22nQDd5qcAGY0WenwCzCphqdbFOpfktZPrI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.1 h1:0bLhH6DRAqox+g0LatcjGKjjhU6Eudyys6HB6DJVPj8= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.1/go.mod h1:O1YSOg3aekZibh2SngvCRRG+cRHKKlYgxf/JBF/Kr/k= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.18.4 h1:0P9VF9miVGT40WSZSuMzHwkwTVIltpDrTrvswMLjbx0= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.18.4/go.mod h1:hqPcyOuLU6yWIbLy3qMnQnmidgKuIEwqIlW6+chYnog= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.2 h1:EN102fWY7hI5u/2FPheTrwwMHkSXfl49RYkeEnJsrCU= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.2/go.mod h1:IgV8l3sj22nQDd5qcAGY0WenwCzCphqdbFOpfktZPrI= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.2 h1:f1lmlce7r13CX1BPyPqt9oh/H+uqOWc9367lDoGGwNQ= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.2/go.mod h1:O1YSOg3aekZibh2SngvCRRG+cRHKKlYgxf/JBF/Kr/k= github.com/aws/aws-sdk-go-v2/service/sts v1.18.3 h1:s49mSnsBZEXjfGBkRfmK+nPqzT7Lt3+t2SmAKNyHblw= github.com/aws/aws-sdk-go-v2/service/sts v1.18.3/go.mod h1:b+psTJn33Q4qGoDaM7ZiOVVG8uVjGI6HaZ8WBHdgDgU= github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8= @@ -327,8 +327,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
chore
Update dependencies
e257df6faaea6a507fcaabba6e26dd8a6fd9f474
2024-10-24 23:42:40
Tom Payne
chore: Make comments more consistent in testscript files
false
diff --git a/internal/cmd/testdata/scripts/initconfig.txtar b/internal/cmd/testdata/scripts/initconfig.txtar index d832f5ca31f..bf8319c210a 100644 --- a/internal/cmd/testdata/scripts/initconfig.txtar +++ b/internal/cmd/testdata/scripts/initconfig.txtar @@ -19,18 +19,18 @@ exec chezmoi init cmp $CHEZMOICONFIGDIR/chezmoi.yaml golden/chezmoi2.yaml cmp $CHEZMOICONFIGDIR/chezmoi.toml golden/chezmoi3.toml -# check that the last operation broke chezmoi +# test that the last operation broke chezmoi ! exec chezmoi status ! stdout . cmpenv stderr golden/error1.log -# check that deleting the old config file fixes the issue +# test that deleting the old config file fixes the issue rm $CHEZMOICONFIGDIR/chezmoi.yaml exec chezmoi status ! stdout . ! stderr . -# check that the state file was written into the default config dir +# test that the state file was written into the default config dir exists $CHEZMOICONFIGDIR/chezmoistate.boltdb chhome home2/user @@ -53,21 +53,21 @@ cp golden/chezmoi3.toml $CHEZMOISOURCEDIR/.chezmoi.toml.tmpl exec chezmoi --config=$HOME/.chezmoi/athome.yaml init cmp $HOME/.chezmoi/athome.yaml golden/chezmoi3.toml -# check that the last operation broke chezmoi +# test that the last operation broke chezmoi ! exec chezmoi --config=$HOME/.chezmoi/athome.yaml status ! stdout . cmpenv stderr golden/error2.log -# check that renaming the file and updating the config path fixes the issue +# test that renaming the file and updating the config path fixes the issue mv $HOME/.chezmoi/athome.yaml $HOME/.chezmoi/athome.toml exec chezmoi --config=$HOME/.chezmoi/athome.toml status ! stdout . ! stderr . -# check that the state file was written next to the config file +# test that the state file was written next to the config file exists $HOME/.chezmoi/chezmoistate.boltdb -# check that nothing was ever written into the default config dir +# test that nothing was ever written into the default config dir ! exists $CHEZMOICONFIGDIR/chezmoi.toml ! exists $CHEZMOICONFIGDIR/chezmoistate.boltdb @@ -91,20 +91,20 @@ cp golden/chezmoi3.toml $CHEZMOISOURCEDIR/.chezmoi.toml.tmpl exec chezmoi --config=$HOME/.chezmoi/athome.txt --config-format=yaml init cmp $HOME/.chezmoi/athome.txt golden/chezmoi3.toml -# check that the last operation broke chezmoi +# test that the last operation broke chezmoi ! exec chezmoi --config=$HOME/.chezmoi/athome.txt --config-format=yaml status ! stdout . cmpenv stderr golden/error3.log -# check that updating the config format fixes the issue +# test that updating the config format fixes the issue exec chezmoi --config=$HOME/.chezmoi/athome.txt --config-format=toml status ! stdout . ! stderr . -# check that the state file was written next to the config file +# test that the state file was written next to the config file exists $HOME/.chezmoi/chezmoistate.boltdb -# check that nothing was ever written into the default config dir +# test that nothing was ever written into the default config dir ! exists $CHEZMOICONFIGDIR/chezmoi.toml ! exists $CHEZMOICONFIGDIR/chezmoistate.boltdb diff --git a/internal/cmd/testdata/scripts/issue2695.txtar b/internal/cmd/testdata/scripts/issue2695.txtar index 8f5a498d614..2c5f18692dd 100644 --- a/internal/cmd/testdata/scripts/issue2695.txtar +++ b/internal/cmd/testdata/scripts/issue2695.txtar @@ -3,7 +3,7 @@ stderr 'invalid config' ! stderr 'json.*json' -# check that chezmoi doctor warns about invalid JSON config files +# test that chezmoi doctor warns about invalid JSON config files ! exec chezmoi doctor stdout 'error\s+config-file\s+.*invalid character' @@ -14,7 +14,7 @@ chhome home2/user stderr 'invalid config' ! stderr 'chezmoi\.toml.*chezmoi\.toml' -# check that chezmoi doctor warns about invalid TOML config files +# test that chezmoi doctor warns about invalid TOML config files ! exec chezmoi doctor stdout 'error\s+config-file\s+.*incomplete number' @@ -25,7 +25,7 @@ chhome home3/user stderr 'invalid config' ! stderr 'chezmoi\.yaml.*chezmoi\.yaml' -# check that chezmoi doctor warns about invalid YAML config files +# test that chezmoi doctor warns about invalid YAML config files ! exec chezmoi doctor stdout 'error\s+config-file\s+.*unmarshal errors'
chore
Make comments more consistent in testscript files
083fa67d726009db54a6a16e6d8fd1804cb08533
2021-12-11 18:53:08
Tom Payne
chore: Add more script order tests
false
diff --git a/internal/cmd/testdata/scripts/scriptorder_unix.txt b/internal/cmd/testdata/scripts/scriptorder_unix.txt index abae24913a1..5846d457997 100644 --- a/internal/cmd/testdata/scripts/scriptorder_unix.txt +++ b/internal/cmd/testdata/scripts/scriptorder_unix.txt @@ -1,6 +1,12 @@ [windows] skip 'UNIX only' # test that chezmoi apply runs scripts in the correct order +symlink home/user/.local/share/chezmoi/.chezmoiscripts/run_before_00-chezmoiscripts-before -> ../.script.sh +symlink home/user/.local/share/chezmoi/.chezmoiscripts/run_before_99-chezmoiscripts-before -> ../.script.sh +symlink home/user/.local/share/chezmoi/.chezmoiscripts/run_00-chezmoiscripts -> ../.script.sh +symlink home/user/.local/share/chezmoi/.chezmoiscripts/run_99-chezmoiscripts -> ../.script.sh +symlink home/user/.local/share/chezmoi/.chezmoiscripts/run_after_00-chezmoiscripts-after -> ../.script.sh +symlink home/user/.local/share/chezmoi/.chezmoiscripts/run_after_99-chezmoiscripts-after -> ../.script.sh symlink home/user/.local/share/chezmoi/run_before_00-before -> .script.sh symlink home/user/.local/share/chezmoi/run_before_99-before -> .script.sh symlink home/user/.local/share/chezmoi/run_00 -> .script.sh @@ -11,12 +17,19 @@ chezmoi apply --force cmp stdout golden/apply -- golden/apply -- +00-chezmoiscripts-before +99-chezmoiscripts-before 00-before 99-before +00-chezmoiscripts +99-chezmoiscripts 00 99 +00-chezmoiscripts-after +99-chezmoiscripts-after 00-after 99-after +-- home/user/.local/share/chezmoi/.chezmoiscripts/.keep -- -- home/user/.local/share/chezmoi/.script.sh -- #!/bin/sh
chore
Add more script order tests
3a8c4cc639ebb60450755d205e8558739c218809
2022-02-20 06:00:52
Tom Payne
chore: Update dependencies
false
diff --git a/go.mod b/go.mod index 19c1365d40c..549b81945e8 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.16 require ( filippo.io/age v1.0.0 github.com/Masterminds/sprig/v3 v3.2.2 - github.com/Microsoft/go-winio v0.5.1 // indirect + github.com/Microsoft/go-winio v0.5.2 // indirect github.com/ProtonMail/go-crypto v0.0.0-20220113124808-70ae35bab23f // indirect github.com/bmatcuk/doublestar/v4 v4.0.2 github.com/bradenhilton/mozillainstallhash v1.0.0 @@ -44,18 +44,18 @@ require ( github.com/twpayne/go-xdg/v6 v6.0.0 github.com/ulikunitz/xz v0.5.10 github.com/xanzy/ssh-agent v0.3.1 // indirect - github.com/yuin/goldmark v1.4.5 // indirect + github.com/yuin/goldmark v1.4.7 // indirect github.com/zalando/go-keyring v0.1.1 go.etcd.io/bbolt v1.3.6 go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.7.0 - golang.org/x/crypto v0.0.0-20220209195652-db638375bc3a // indirect + golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c golang.org/x/sys v0.0.0-20220209214540-3681064d5158 golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 - gopkg.in/ini.v1 v1.66.3 // indirect + gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b howett.net/plist v1.0.0 diff --git a/go.sum b/go.sum index 663c61a4176..186bedcfd9c 100644 --- a/go.sum +++ b/go.sum @@ -75,8 +75,8 @@ github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFP github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY= -github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= @@ -647,8 +647,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.4/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg= -github.com/yuin/goldmark v1.4.5 h1:4OEQwtW2uLXjEdgnGM3Vg652Pq37X7NOIRzFWb3BzIc= -github.com/yuin/goldmark v1.4.5/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg= +github.com/yuin/goldmark v1.4.7 h1:KHHlQL4EKBZ43vpA1KBEQHfodk4JeIgeb0xJLg7rvDI= +github.com/yuin/goldmark v1.4.7/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg= github.com/yuin/goldmark-emoji v1.0.1 h1:ctuWEyzGBwiucEqxzwe0SOYDXPAucOrE9NQC18Wa1os= github.com/yuin/goldmark-emoji v1.0.1/go.mod h1:2w1E6FEWLcDQkoTE+7HU6QF1F6SLlNGjRIBbIZQFqkQ= github.com/zalando/go-keyring v0.1.1 h1:w2V9lcx/Uj4l+dzAf1m9s+DJ1O8ROkEHnynonHjTcYE= @@ -696,8 +696,8 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.0.0-20220209195652-db638375bc3a h1:atOEWVSedO4ksXBe/UrlbSLVxQQ9RxM/tT2Jy10IaHo= -golang.org/x/crypto v0.0.0-20220209195652-db638375bc3a/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292 h1:f+lwQ+GtmgoY+A2YaQxlSOnDjXcQ7ZRLWOHbC6HtRqE= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1142,8 +1142,8 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.66.3 h1:jRskFVxYaMGAMUbN0UZ7niA9gzL9B49DOqE78vg0k3w= -gopkg.in/ini.v1 v1.66.3/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= +gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0 h1:POO/ycCATvegFmVuPpQzZFJ+pGZeX22Ufu6fibxDVjU=
chore
Update dependencies
4a814f7fb7bed3cc0f245134b39d9609d7f7a5b1
2023-07-03 12:21:43
Tom Payne
chore: Don't make release depend on skipped FreeBSD step
false
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 13d48175228..5d98424bd7a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -383,7 +383,6 @@ jobs: - test-archlinux - test-debian-i386 - test-fedora - - test-freebsd - test-macos - test-oldstable-go - test-release
chore
Don't make release depend on skipped FreeBSD step
d14bdd5e5af9103889cd3d2ffbb7195aacf02e45
2024-02-17 05:32:45
Tom Payne
fix: Use uname -o to detect Android in install script
false
diff --git a/assets/scripts/install-local-bin.sh b/assets/scripts/install-local-bin.sh index 6b8dbd9f1c5..07d26ac9108 100644 --- a/assets/scripts/install-local-bin.sh +++ b/assets/scripts/install-local-bin.sh @@ -119,11 +119,10 @@ get_goos() { case "${os}" in cygwin_nt*) goos="windows" ;; linux) - if is_command termux-info; then - goos=android - else - goos=linux - fi + case "$(uname -o | tr '[:upper:]' '[:lower:]')" in + android) goos="android" ;; + *) goos="linux" ;; + esac ;; mingw*) goos="windows" ;; msys_nt*) goos="windows" ;; diff --git a/assets/scripts/install.sh b/assets/scripts/install.sh index 038e4fb0273..7f5c58e7006 100644 --- a/assets/scripts/install.sh +++ b/assets/scripts/install.sh @@ -119,11 +119,10 @@ get_goos() { case "${os}" in cygwin_nt*) goos="windows" ;; linux) - if is_command termux-info; then - goos=android - else - goos=linux - fi + case "$(uname -o | tr '[:upper:]' '[:lower:]')" in + android) goos="android" ;; + *) goos="linux" ;; + esac ;; mingw*) goos="windows" ;; msys_nt*) goos="windows" ;; diff --git a/internal/cmds/generate-install.sh/install.sh.tmpl b/internal/cmds/generate-install.sh/install.sh.tmpl index 967b67c78f7..406639f9080 100644 --- a/internal/cmds/generate-install.sh/install.sh.tmpl +++ b/internal/cmds/generate-install.sh/install.sh.tmpl @@ -119,11 +119,10 @@ get_goos() { case "${os}" in cygwin_nt*) goos="windows" ;; linux) - if is_command termux-info; then - goos=android - else - goos=linux - fi + case "$(uname -o | tr '[:upper:]' '[:lower:]')" in + android) goos="android" ;; + *) goos="linux" ;; + esac ;; mingw*) goos="windows" ;; msys_nt*) goos="windows" ;;
fix
Use uname -o to detect Android in install script
fb5430501ef637f996c0dcf68288b5d4cae61938
2024-04-04 14:51:03
Tom Payne
chore: Update dependencies
false
diff --git a/go.mod b/go.mod index 8d6eba6e11b..95b98bac75d 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/google/go-github/v60 v60.0.0 github.com/google/renameio/v2 v2.0.0 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 - github.com/itchyny/gojq v0.12.14 + github.com/itchyny/gojq v0.12.15 github.com/klauspost/compress v1.17.7 github.com/mitchellh/copystructure v1.2.0 github.com/mitchellh/mapstructure v1.5.0 @@ -42,7 +42,7 @@ require ( github.com/twpayne/go-shell v0.4.0 github.com/twpayne/go-vfs/v5 v5.0.4 github.com/twpayne/go-xdg/v6 v6.1.3 - github.com/ulikunitz/xz v0.5.11 + github.com/ulikunitz/xz v0.5.12 github.com/zalando/go-keyring v0.2.4 github.com/zricethezav/gitleaks/v8 v8.18.2 go.etcd.io/bbolt v1.3.9 @@ -59,7 +59,7 @@ require ( require ( dario.cat/mergo v1.0.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect @@ -145,12 +145,12 @@ require ( github.com/spf13/viper v1.18.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - github.com/yuin/goldmark v1.7.0 // indirect + github.com/yuin/goldmark v1.7.1 // indirect github.com/yuin/goldmark-emoji v1.0.2 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 // indirect golang.org/x/mod v0.16.0 // indirect - golang.org/x/net v0.22.0 // indirect + golang.org/x/net v0.23.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.19.0 // indirect google.golang.org/appengine v1.6.8 // indirect diff --git a/go.sum b/go.sum index 46769375e01..0de5ffb3ca6 100644 --- a/go.sum +++ b/go.sum @@ -18,8 +18,8 @@ filippo.io/age v1.1.1 h1:pIpO7l151hCnQ4BdyBujnGP2YlUo0uj6sAVNHGBvXHg= filippo.io/age v1.1.1/go.mod h1:l03SrzDUrBkdBx8+IILdnn2KZysqQdbEBUQ4p3sqEQE= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0 h1:n1DH8TPV4qqPTje2RcUBYwtrTWlabVp4n46+74X2pn4= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0/go.mod h1:HDcZnuGbiyppErN6lB+idp4CKhjbc8gwjto6OPpyggM= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 h1:E+OJmp2tPvt1W+amx48v1eqbjDYsgN+RzP4q16yV5eM= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1/go.mod h1:a6xsAQUZg+VsS3TJ05SRp524Hs4pZ/AeFSr5ENf0Yjo= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo= github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= @@ -241,8 +241,8 @@ github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/itchyny/gojq v0.12.14 h1:6k8vVtsrhQSYgSGg827AD+PVVaB1NLXEdX+dda2oZCc= -github.com/itchyny/gojq v0.12.14/go.mod h1:y1G7oO7XkcR1LPZO59KyoCRy08T3j9vDYRV0GgYSS+s= +github.com/itchyny/gojq v0.12.15 h1:WC1Nxbx4Ifw5U2oQWACYz32JK8G9qxNtHzrvW4KEcqI= +github.com/itchyny/gojq v0.12.15/go.mod h1:uWAHCbCIla1jiNxmeT5/B5mOjSdfkCq6p8vxWg+BM10= github.com/itchyny/timefmt-go v0.1.5 h1:G0INE2la8S6ru/ZI5JecgyzbbJNs5lG1RcBqa7Jm6GE= github.com/itchyny/timefmt-go v0.1.5/go.mod h1:nEP7L+2YmAbT2kZ2HfSs1d8Xtw9LY8D2stDBckWakZ8= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= @@ -425,16 +425,16 @@ github.com/twpayne/go-vfs/v5 v5.0.4 h1:/ne3h+rW7f5YOyOFguz+3ztfUwzOLR0Vts3y0mMAi github.com/twpayne/go-vfs/v5 v5.0.4/go.mod h1:zTPFJUbgsEMFNSWnWQlLq9wh4AN83edZzx3VXbxrS1w= github.com/twpayne/go-xdg/v6 v6.1.3 h1:viM0S9v4KAc0IRW2xI3Zp8ZkqOCoCxmCmVZ7GTnG0y0= github.com/twpayne/go-xdg/v6 v6.1.3/go.mod h1:kVT9oShzQ0Cb5r4gzwziZUfluW2sTR72slQC/4N1AXI= -github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= -github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc= +github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk= github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/yuin/goldmark v1.3.7/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yuin/goldmark v1.7.0 h1:EfOIvIMZIzHdB/R/zVrikYLPPwJlfMcNczJFMs1m6sA= -github.com/yuin/goldmark v1.7.0/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= +github.com/yuin/goldmark v1.7.1 h1:3bajkSilaCbjdKVsKdZjZCLBNPL9pYzrCakKaf4U49U= +github.com/yuin/goldmark v1.7.1/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= github.com/yuin/goldmark-emoji v1.0.2 h1:c/RgTShNgHTtc6xdz2KKI74jJr6rWi7FPgnP9GAsO5s= github.com/yuin/goldmark-emoji v1.0.2/go.mod h1:RhP/RWpexdp+KHs7ghKnifRoIs/Bq4nDS7tRbCkOwKY= github.com/zalando/go-keyring v0.2.4 h1:wi2xxTqdiwMKbM6TWwi+uJCG/Tum2UV0jqaQhCa9/68= @@ -482,8 +482,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= -golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
chore
Update dependencies
8c60acb42310059b4226c66d4c0da7495cfe5b34
2021-12-11 21:21:23
Tom Payne
chore: Factor out HTTP request logging
false
diff --git a/internal/chezmoi/sourcestate.go b/internal/chezmoi/sourcestate.go index 27ddb82d304..1c1fa2b2ab5 100644 --- a/internal/chezmoi/sourcestate.go +++ b/internal/chezmoi/sourcestate.go @@ -29,6 +29,8 @@ import ( "github.com/rs/zerolog/log" vfs "github.com/twpayne/go-vfs/v4" "go.uber.org/multierr" + + "github.com/twpayne/chezmoi/v2/internal/chezmoilog" ) // An ExternalType is a type of external source. @@ -1164,25 +1166,7 @@ func (s *SourceState) getExternalDataRaw( if err != nil { return nil, err } - start := time.Now() - resp, err := s.httpClient.Do(req) - if resp != nil { - s.logger.Err(err). - Stringer("duration", time.Since(start)). - Str("method", req.Method). - Int64("size", resp.ContentLength). - Int("statusCode", resp.StatusCode). - Str("status", resp.Status). - Stringer("url", req.URL). - Msg("HTTP") - } else { - s.logger.Err(err). - Stringer("duration", time.Since(start)). - Str("method", req.Method). - Int64("size", resp.ContentLength). - Stringer("url", req.URL). - Msg("HTTP") - } + resp, err := chezmoilog.LogHTTPRequest(s.logger, s.httpClient, req) if err != nil { return nil, err } diff --git a/internal/chezmoilog/chezmoilog.go b/internal/chezmoilog/chezmoilog.go index 7b9b95df63e..652d8f58dab 100644 --- a/internal/chezmoilog/chezmoilog.go +++ b/internal/chezmoilog/chezmoilog.go @@ -3,6 +3,7 @@ package chezmoilog import ( "errors" + "net/http" "os" "os/exec" "time" @@ -97,6 +98,31 @@ func FirstFewBytes(data []byte) []byte { return data } +// LogHTTPRequest calls httpClient.Do, logs the result to logger, and returns +// the result. +func LogHTTPRequest(logger *zerolog.Logger, client *http.Client, req *http.Request) (*http.Response, error) { + start := time.Now() + resp, err := client.Do(req) + if resp != nil { + logger.Err(err). + Stringer("duration", time.Since(start)). + Str("method", req.Method). + Int64("size", resp.ContentLength). + Int("statusCode", resp.StatusCode). + Str("status", resp.Status). + Stringer("url", req.URL). + Msg("HTTPRequest") + } else { + logger.Err(err). + Stringer("duration", time.Since(start)). + Str("method", req.Method). + Int64("size", resp.ContentLength). + Stringer("url", req.URL). + Msg("HTTPRequest") + } + return resp, err +} + // LogCmdCombinedOutput calls cmd.CombinedOutput, logs the result, and returns the result. func LogCmdCombinedOutput(cmd *exec.Cmd) ([]byte, error) { start := time.Now() diff --git a/internal/cmd/upgradecmd.go b/internal/cmd/upgradecmd.go index 718894af9f6..b5e59ab2362 100644 --- a/internal/cmd/upgradecmd.go +++ b/internal/cmd/upgradecmd.go @@ -19,7 +19,6 @@ import ( "regexp" "runtime" "strings" - "time" "github.com/coreos/go-semver/semver" "github.com/google/go-github/v40/github" @@ -27,6 +26,7 @@ import ( vfs "github.com/twpayne/go-vfs/v4" "github.com/twpayne/chezmoi/v2/internal/chezmoi" + "github.com/twpayne/chezmoi/v2/internal/chezmoilog" ) const ( @@ -246,25 +246,7 @@ func (c *Config) downloadURL(ctx context.Context, url string) ([]byte, error) { if err != nil { return nil, err } - start := time.Now() - resp, err := httpClient.Do(req) - if resp != nil { - c.logger.Err(err). - Stringer("duration", time.Since(start)). - Str("method", req.Method). - Int64("size", resp.ContentLength). - Int("statusCode", resp.StatusCode). - Str("status", resp.Status). - Stringer("url", req.URL). - Msg("HTTP") - } else { - c.logger.Err(err). - Stringer("duration", time.Since(start)). - Str("method", req.Method). - Int64("size", resp.ContentLength). - Stringer("url", req.URL). - Msg("HTTP") - } + resp, err := chezmoilog.LogHTTPRequest(c.logger, httpClient, req) if err != nil { return nil, err }
chore
Factor out HTTP request logging
419c6c3100b9aa1a89fc096e4565c691263f2740
2022-01-28 02:51:15
Tom Payne
docs: Fix count
false
diff --git a/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/usage.md b/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/usage.md index 1ba04a955d5..4268a5cd285 100644 --- a/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/usage.md +++ b/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/usage.md @@ -2,7 +2,7 @@ ## How do I edit my dotfiles with chezmoi? -There are four popular approaches: +There are five popular approaches: 1. Use `chezmoi edit $FILE`. This will open the source file for `$FILE` in your editor, including . For extra ease, use `chezmoi edit --apply $FILE` to apply
docs
Fix count
9605e40fbdc412f9a634ca0bde8f40543d65aaf0
2022-06-18 05:32:30
Tom Payne
feat: Make --autotemplate escape template markers
false
diff --git a/pkg/chezmoi/autotemplate.go b/pkg/chezmoi/autotemplate.go index e5dc2efdcad..17922fb7679 100644 --- a/pkg/chezmoi/autotemplate.go +++ b/pkg/chezmoi/autotemplate.go @@ -1,6 +1,7 @@ package chezmoi import ( + "regexp" "sort" "strings" ) @@ -12,6 +13,8 @@ type templateVariable struct { value string } +var templateMarkerRx = regexp.MustCompile(`[{}]{2,}`) + // byValueLength implements sort.Interface for a slice of templateVariables, // sorting by value length. type byValueLength []templateVariable @@ -29,20 +32,32 @@ func (b byValueLength) Less(i, j int) bool { } func (b byValueLength) Swap(i, j int) { b[i], b[j] = b[j], b[i] } -// autoTemplate converts contents into a template by replacing values in data -// with their keys. It returns the template and if any replacements were made. +// autoTemplate converts contents into a template by escaping template markers +// and replacing values in data with their keys. It returns the template and if +// any replacements were made. func autoTemplate(contents []byte, data map[string]interface{}) ([]byte, bool) { + contentsStr := string(contents) + replacements := false + + // Replace template markers. + replacedTemplateMarkersStr := templateMarkerRx.ReplaceAllString(contentsStr, `{{ "$0" }}`) + if replacedTemplateMarkersStr != contentsStr { + contentsStr = replacedTemplateMarkersStr + replacements = true + } + + // Replace variables. + // // This naive approach will generate incorrect templates if the variable // names match variable values. The algorithm here is probably O(N^2), we // can do better. variables := extractVariables(data) sort.Sort(sort.Reverse(byValueLength(variables))) - contentsStr := string(contents) - replacements := false for _, variable := range variables { if variable.value == "" { continue } + index := strings.Index(contentsStr, variable.value) for index != -1 && index != len(contentsStr) { if !inWord(contentsStr, index) && !inWord(contentsStr, index+len(variable.value)) { @@ -57,6 +72,7 @@ func autoTemplate(contents []byte, data map[string]interface{}) ([]byte, bool) { // progress. index++ } + // Look for the next occurrence of variable.value. j := strings.Index(contentsStr[index:], variable.value) if j == -1 { @@ -68,6 +84,7 @@ func autoTemplate(contents []byte, data map[string]interface{}) ([]byte, bool) { } } } + return []byte(contentsStr), replacements } diff --git a/pkg/chezmoi/autotemplate_test.go b/pkg/chezmoi/autotemplate_test.go index ea538327335..7cc77ec050b 100644 --- a/pkg/chezmoi/autotemplate_test.go +++ b/pkg/chezmoi/autotemplate_test.go @@ -136,6 +136,12 @@ func TestAutoTemplate(t *testing.T) { }, expected: "a", }, + { + name: "markers", + contentsStr: "{{}}", + expected: `{{ "{{}}" }}`, + expectedReplacements: true, + }, } { t.Run(tc.name, func(t *testing.T) { actualTemplate, actualReplacements := autoTemplate([]byte(tc.contentsStr), tc.data) diff --git a/pkg/cmd/testdata/scripts/addautotemplate.txt b/pkg/cmd/testdata/scripts/addautotemplate.txt index 4ff6f31a856..255c0624923 100644 --- a/pkg/cmd/testdata/scripts/addautotemplate.txt +++ b/pkg/cmd/testdata/scripts/addautotemplate.txt @@ -11,16 +11,24 @@ cmp $CHEZMOISOURCEDIR/symlink_dot_symlink.tmpl golden/symlink_dot_symlink.tmpl chezmoi add --autotemplate $HOME${/}.file cmp $CHEZMOISOURCEDIR/dot_file golden/dot_file +# test that chezmoi add --autotemplate escapes brackets +chezmoi add --autotemplate $HOME${/}.vimrc +cmp $CHEZMOISOURCEDIR/dot_vimrc.tmpl golden/dot_vimrc.tmpl + -- golden/dot_file -- # contents of .file -- golden/dot_template.tmpl -- key = {{ .variable }} -- golden/symlink_dot_symlink.tmpl -- .target-{{ .variable }} +-- golden/dot_vimrc.tmpl -- +set foldmarker={{ "{{" }},{{ "}}" }} -- home/user/.config/chezmoi/chezmoi.toml -- [data] variable = "value" -- home/user/.file -- # contents of .file +-- home/user/.vimrc -- +set foldmarker={{,}} -- home/user/.template -- key = value
feat
Make --autotemplate escape template markers
33de82be27d5761289a00b87695be3f7a9e9a0cc
2022-02-15 05:31:33
Tom Payne
docs: Tweak links
false
diff --git a/assets/chezmoi.io/docs/index.md b/assets/chezmoi.io/docs/index.md index b21ec1af9ae..e4fd3ce0314 100644 --- a/assets/chezmoi.io/docs/index.md +++ b/assets/chezmoi.io/docs/index.md @@ -22,9 +22,9 @@ description of chezmoi, consult the [reference](/reference/). ## Considering using chezmoi? -You can browse other people's [dotfiles that use chezmoi on -GitHub](https://github.com/topics/chezmoi?o=desc&s=updated) and [dotfiles that -use chezmoi on GitLab](https://gitlab.com/explore/projects?topic=chezmoi), -[read articles, listen to podcasts, and watch videos about +You can browse other people's dotfiles that use chezmoi [on +GitHub](https://github.com/topics/chezmoi?o=desc&s=updated) and [on +GitLab](https://gitlab.com/explore/projects?topic=chezmoi), [read articles, +listen to podcasts, and watch videos about chezmoi](/links/articles-podcasts-and-videos/) and see [how chezmoi compares to other dotfile managers](/comparison-table/).
docs
Tweak links
615f155ea473e1b592dcfea9ff0be3cf22f99531
2021-11-15 00:29:39
Tom Payne
chore: Add more entries to go.sum
false
diff --git a/go.sum b/go.sum index 0896c31d82e..d6656dc3a5d 100644 --- a/go.sum +++ b/go.sum @@ -74,6 +74,7 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= github.com/ProtonMail/go-crypto v0.0.0-20210920160938-87db9fbc61c7 h1:DSqTh6nEes/uO8BlNcGk8PzZsxY2sN9ZL//veWBdTRI= github.com/ProtonMail/go-crypto v0.0.0-20210920160938-87db9fbc61c7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= +github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= @@ -191,6 +192,7 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.2.6-0.20210915003542-8b1f7f90f6b1 h1:4dntyT+x6QTOSCIrgczbQ+ockAEha0cfxD5Wi0iCzjY= github.com/go-ole/go-ole v1.2.6-0.20210915003542-8b1f7f90f6b1/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -372,6 +374,7 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kevinburke/ssh_config v1.1.0 h1:pH/t1WS9NzT8go394IqZeJTMHVm6Cr6ZJ6AQ+mdNo/o= github.com/kevinburke/ssh_config v1.1.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19 h1:WjT3fLi9n8YWh/Ih8Q1LHAPsTqGddPcHqscN+PJ3i68= github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19/go.mod h1:hY+WOq6m2FpbvyrI93sMaypsttvaIL5nhVR92dTMUcQ= github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -503,6 +506,7 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shirou/gopsutil/v3 v3.21.9 h1:Vn4MUz2uXhqLSiCbGFRc0DILbMVLAY92DSkT8bsYrHg= github.com/shirou/gopsutil/v3 v3.21.9/go.mod h1:YWp/H8Qs5fVmf17v7JNZzA0mPJ+mS2e9JdiUF9LlKzQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.0 h1:KK3gWIXskZ2O1U/JNTisNcvH+jveJxZYrjbTsrbbnh8= @@ -547,7 +551,9 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= +github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= github.com/twpayne/go-pinentry v0.0.2 h1:xncgnq3VGWgOq5gMx1SmK++7PrfvkvqZZY00SijBASs= github.com/twpayne/go-pinentry v0.0.2/go.mod h1:OUbsOnVXqvfSr8PZzFkSNJdBTJOPepfM0NSlDmR5paY= @@ -564,6 +570,7 @@ github.com/twpayne/go-xdg/v6 v6.0.0/go.mod h1:XlfiGBU0iBxudVRWh+SXF+I1Cfb7rMq1IF github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xanzy/ssh-agent v0.3.1 h1:AmzO1SSWxw73zxFZPRwaMN1MohDw8UyHnmuxyceTEGo= github.com/xanzy/ssh-agent v0.3.1/go.mod h1:QIE4lCeL7nkC25x+yA3LBIYfwCc1TFziCtG7cBAac6w= +github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -896,6 +903,7 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5 h1:ouewzE6p+/VEB31YYnTbEJdi8pFqKp4P4n85vwo3DHA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1070,6 +1078,7 @@ howett.net/plist v0.0.0-20201203080718-1454fab16a06 h1:QDxUo/w2COstK1wIBYpzQlHX/ howett.net/plist v0.0.0-20201203080718-1454fab16a06/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/goversion v1.2.0 h1:SPn+NLTiAG7w30IRK/DKp1BjvpWabYgxlLp/+kx5J8w= rsc.io/goversion v1.2.0/go.mod h1:Eih9y/uIBS3ulggl7KNJ09xGSLcuNaLgmvvqa07sgfo= rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
chore
Add more entries to go.sum
40b8e707b78acf878f7e5e680c1856a52487d1bc
2022-04-29 04:59:30
Tom Payne
chore: Remove debug code
false
diff --git a/pkg/cmd/testdata/scripts/externalgitrepo.txt b/pkg/cmd/testdata/scripts/externalgitrepo.txt index 9300c1b8694..9260b65caf8 100644 --- a/pkg/cmd/testdata/scripts/externalgitrepo.txt +++ b/pkg/cmd/testdata/scripts/externalgitrepo.txt @@ -12,7 +12,7 @@ exec git commit --message 'initial commit' cd $WORK # test that chezmoi apply clones the git repo -chezmoi apply --debug +chezmoi apply cmp $HOME/.dir/.file golden/.file chhome home2/user @@ -20,7 +20,7 @@ mkgitconfig expandenv $WORK/home2/user/.local/share/chezmoi/.chezmoiexternal.toml # test that chezmoi apply clones the git repo -chezmoi apply --debug +chezmoi apply cmp $HOME/.dir/.file golden/.file # update the git repo
chore
Remove debug code
90c6ba1dd2ffb52b12f9acfdab371484d03e71c9
2024-11-07 02:37:01
Ruslan Sayfutdinov
chore: Enable uv cache
false
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c62aca558f3..408194292b1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -289,6 +289,7 @@ jobs: go-version: ${{ env.GO_VERSION }} - uses: astral-sh/setup-uv@3b9817b1bf26186f03ab8277bab9b827ea5cc254 with: + enable-cache: true version: ${{ env.UV_VERSION }} - name: install-website-dependencies run: | @@ -461,6 +462,7 @@ jobs: go-version: ${{ env.GO_VERSION }} - uses: astral-sh/setup-uv@3b9817b1bf26186f03ab8277bab9b827ea5cc254 with: + enable-cache: true version: ${{ env.UV_VERSION }} - name: prepare-chezmoi.io run: |
chore
Enable uv cache
2901b5b6db745523852d1ef98cc054ae1bd1a517
2025-02-24 04:29:23
Tom Payne
chore: Update dependencies
false
diff --git a/go.mod b/go.mod index 35a960d62e8..e5a7f75f159 100644 --- a/go.mod +++ b/go.mod @@ -18,6 +18,7 @@ require ( github.com/charmbracelet/bubbles v0.20.0 github.com/charmbracelet/bubbletea v1.3.3 github.com/charmbracelet/glamour v0.8.0 + github.com/charmbracelet/lipgloss v1.0.0 github.com/coreos/go-semver v0.3.1 github.com/fsnotify/fsnotify v1.8.0 github.com/go-git/go-git/v5 v5.13.2 @@ -32,7 +33,7 @@ require ( github.com/mitchellh/copystructure v1.2.0 github.com/mitchellh/mapstructure v1.5.0 github.com/muesli/combinator v0.3.0 - github.com/muesli/termenv v0.15.3-0.20240618155329-98d742f6907a + github.com/muesli/termenv v0.16.0 github.com/pelletier/go-toml/v2 v2.2.3 github.com/rogpeppe/go-internal v1.13.1 github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 @@ -50,8 +51,8 @@ require ( github.com/zricethezav/gitleaks/v8 v8.24.0 go.etcd.io/bbolt v1.4.0 go.uber.org/automaxprocs v1.6.0 - golang.org/x/crypto v0.33.0 - golang.org/x/crypto/x509roots/fallback v0.0.0-20250214233241-911360c8a4f4 + golang.org/x/crypto v0.34.0 + golang.org/x/crypto/x509roots/fallback v0.0.0-20250222003138-f66f74b0a406 golang.org/x/oauth2 v0.26.0 golang.org/x/sync v0.11.0 golang.org/x/sys v0.30.0 @@ -94,7 +95,6 @@ require ( github.com/bradenhilton/cityhash v1.0.0 // indirect github.com/caspr-io/yamlpath v0.0.0-20200722075116-502e8d113a9b // indirect github.com/charmbracelet/harmonica v0.2.0 // indirect - github.com/charmbracelet/lipgloss v1.0.0 // indirect github.com/charmbracelet/x/ansi v0.8.0 // indirect github.com/charmbracelet/x/term v0.2.1 // indirect github.com/cloudflare/circl v1.6.0 // indirect @@ -119,7 +119,7 @@ require ( github.com/golang-jwt/jwt/v5 v5.2.1 // indirect github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect github.com/google/btree v1.1.3 // indirect - github.com/google/go-cmp v0.6.0 // indirect + github.com/google/go-cmp v0.7.0 // indirect github.com/google/go-github/v61 v61.0.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.6.0 // indirect diff --git a/go.sum b/go.sum index 86ae72caf36..49dad7e3547 100644 --- a/go.sum +++ b/go.sum @@ -262,8 +262,8 @@ github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/go-github/v61 v61.0.0 h1:VwQCBwhyE9JclCI+22/7mLB1PuU9eowCXKY5pNlu1go= github.com/google/go-github/v61 v61.0.0/go.mod h1:0WR+KmsWX75G2EbpyGsGmradjo3IiciuI4BmdVCobQY= github.com/google/go-github/v69 v69.2.0 h1:wR+Wi/fN2zdUx9YxSmYE0ktiX9IAR/BeePzeaUUbEHE= @@ -426,8 +426,8 @@ github.com/muesli/crunchy v0.4.0 h1:qdiml8gywULHBsztiSAf6rrE6EyuNasNKZ104mAaahM= github.com/muesli/crunchy v0.4.0/go.mod h1:9k4x6xdSbb7WwtAVy0iDjaiDjIk6Wa5AgUIqp+HqOpU= github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= -github.com/muesli/termenv v0.15.3-0.20240618155329-98d742f6907a h1:2MaM6YC3mGu54x+RKAA6JiFFHlHDY1UbkxqppT7wYOg= -github.com/muesli/termenv v0.15.3-0.20240618155329-98d742f6907a/go.mod h1:hxSnBBYLK21Vtq/PHd0S2FYCxBXzBua8ov5s1RobyRQ= +github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= +github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= github.com/nats-io/nats.go v1.34.0 h1:fnxnPCNiwIG5w08rlMcEKTUw4AV/nKyGCOJE8TdhSPk= github.com/nats-io/nats.go v1.34.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8= github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI= @@ -632,10 +632,10 @@ go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus= -golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= -golang.org/x/crypto/x509roots/fallback v0.0.0-20250214233241-911360c8a4f4 h1:QDiVWrFJ2lyXzr3pJnIREQWR8S7jkjzuWJPJda8Ic8E= -golang.org/x/crypto/x509roots/fallback v0.0.0-20250214233241-911360c8a4f4/go.mod h1:lxN5T34bK4Z/i6cMaU7frUU57VkDXFD4Kamfl/cp9oU= +golang.org/x/crypto v0.34.0 h1:+/C6tk6rf/+t5DhUketUbD1aNGqiSX3j15Z6xuIDlBA= +golang.org/x/crypto v0.34.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto/x509roots/fallback v0.0.0-20250222003138-f66f74b0a406 h1:d/w3+20viTqZ/22X96q+Fjb+/Ovnr40hnX8V3+Ry1Yg= +golang.org/x/crypto/x509roots/fallback v0.0.0-20250222003138-f66f74b0a406/go.mod h1:lxN5T34bK4Z/i6cMaU7frUU57VkDXFD4Kamfl/cp9oU= golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa h1:t2QcU6V556bFjYgu4L6C+6VrCPyJZ+eyRsABUPs1mz4= golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa/go.mod h1:BHOTPb3L19zxehTsLoJXVaTktb06DFgmdW6Wb9s8jqk= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
chore
Update dependencies
b8efee10eaf8b0c7cc146c3287ded7cb06bb8352
2024-06-11 20:08:07
Tom Payne
chore: Bump goreleaser version
false
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cd1cbed39c2..5565444f12a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ env: GOFUMPT_VERSION: 0.6.0 # https://github.com/mvdan/gofumpt/releases GOLANGCI_LINT_VERSION: 1.59.1 # https://github.com/golangci/golangci-lint/releases GOLINES_VERSION: 0.12.2 # https://github.com/segmentio/golines/releases - GORELEASER_VERSION: 2.0.0 # https://github.com/goreleaser/goreleaser/releases + GORELEASER_VERSION: 2.0.1 # https://github.com/goreleaser/goreleaser/releases GOVERSIONINFO_VERSION: 1.4.0 # https://github.com/josephspurrier/goversioninfo/releases RAGE_VERSION: 0.10.0 # https://github.com/str4d/rage/releases jobs:
chore
Bump goreleaser version
31a991051387599a4a6479b810a5dd920360d1fe
2021-10-25 00:47:54
Tom Payne
chore: Enable GitHub Action annotations of whitespace errors
false
diff --git a/internal/cmds/lint-whitespace/main.go b/internal/cmds/lint-whitespace/main.go index 63257ca96a0..b4925919ebf 100644 --- a/internal/cmds/lint-whitespace/main.go +++ b/internal/cmds/lint-whitespace/main.go @@ -45,14 +45,14 @@ func lintFile(filename string) error { for i, line := range lines { switch { case crlfLineEndingRx.Match(line): - err = multierr.Append(err, fmt.Errorf("%s:%d: CRLF line ending", filename, i+1)) + err = multierr.Append(err, fmt.Errorf("::error file=%s,line=%d::CRLF line ending", filename, i+1)) case trailingWhitespaceRx.Match(line): - err = multierr.Append(err, fmt.Errorf("%s:%d: trailing whitespace", filename, i+1)) + err = multierr.Append(err, fmt.Errorf("::error file=%s,line=%d::trailing whitespace", filename, i+1)) } } if len(data) > 0 && len(lines[len(lines)-1]) != 0 { - err = multierr.Append(err, fmt.Errorf("%s: no newline at end of file", filename)) + err = multierr.Append(err, fmt.Errorf("::error file=%s,line=%d::no newline at end of file", filename, len(lines)+1)) } return err
chore
Enable GitHub Action annotations of whitespace errors
9d145475a466ba28c6fda3fe452541b12773a74d
2024-11-22 15:40:38
Tom Payne
chore: Update tools
false
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 635b5f41c0e..5f075659b5f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,11 +23,11 @@ env: GOFUMPT_VERSION: 0.7.0 # https://github.com/mvdan/gofumpt/releases GOLANGCI_LINT_VERSION: 1.62.0 # https://github.com/golangci/golangci-lint/releases GOLINES_VERSION: 0.12.2 # https://github.com/segmentio/golines/releases - GORELEASER_VERSION: 2.4.5 # https://github.com/goreleaser/goreleaser/releases + GORELEASER_VERSION: 2.4.7 # https://github.com/goreleaser/goreleaser/releases GOVERSIONINFO_VERSION: 1.4.1 # https://github.com/josephspurrier/goversioninfo/releases PYTHON_VERSION: '3.10' # https://www.python.org/downloads/ RAGE_VERSION: 0.11.0 # https://github.com/str4d/rage/releases - UV_VERSION: 0.5.2 # https://github.com/astral-sh/uv/releases + UV_VERSION: 0.5.4 # https://github.com/astral-sh/uv/releases jobs: changes: runs-on: ubuntu-22.04
chore
Update tools
4a52e5c3dc502cc05b8f9337f4cefcc112c8d750
2023-09-22 18:09:23
Arran Ubels
feat: find[One]Executable in user-supplied paths
false
diff --git a/assets/chezmoi.io/docs/reference/templates/functions/findExecutable.md b/assets/chezmoi.io/docs/reference/templates/functions/findExecutable.md new file mode 100644 index 00000000000..353462c022a --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/findExecutable.md @@ -0,0 +1,29 @@ +# `findExecutable` *file* *path-list* + +`findExecutable` searches for an executable named *file* in directories +identified by *path-list*. The result will be the executable file concatenated +with the matching path. If an executable *file* cannot be found in *path-list*, +`findExecutable` returns an empty string. + +`findExecutable` is provided as an alternative to +[`lookPath`](/reference/templates/functions/lookPath) so that you can +interrogate the system PATH as it would be configured after `chezmoi apply`. +Like `lookPath`, `findExecutable` is not hermetic: its return value depends on +the state of the filesystem at the moment the template is executed. Exercise +caution when using it in your templates. + +The return value of the first successful call to `findExecutable` is cached, and +future calls to `findExecutable` with the same parameters will return this path. + +!!! info + + On Windows, the resulting path will contain the first found executable + extension as identified by the environment variable `%PathExt%`. + +!!! example + + ``` + {{ if findExecutable "rtx" (list "bin" "go/bin" ".cargo/bin" ".local/bin") }} + # $HOME/.cargo/bin/rtx exists and will probably be in $PATH after apply + {{ end }} + ``` diff --git a/assets/chezmoi.io/docs/reference/templates/functions/findOneExecutable.md b/assets/chezmoi.io/docs/reference/templates/functions/findOneExecutable.md new file mode 100644 index 00000000000..44e9e3e08df --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/functions/findOneExecutable.md @@ -0,0 +1,32 @@ +# `findOneExecutable` *file-list* *path-list* + +`findOneExecutable` searches for an executable from *file-list* in directories +identified by *path-list*, finding the first matching executable in the first +matching directory (each directory is searched for matching executables in +turn). The result will be the executable file concatenated with the matching +path. If an executable from *file-list* cannot be found in *path-list*, +`findOneExecutable` returns an empty string. + +`findOneExecutable` is provided as an alternative to +[`lookPath`](/reference/templates/functions/lookPath) so that you can +interrogate the system PATH as it would be configured after `chezmoi apply`. +Like `lookPath`, `findOneExecutable` is not hermetic: its return value depends +on the state of the filesystem at the moment the template is executed. Exercise +caution when using it in your templates. + +The return value of the first successful call to `findOneExecutable` is cached, +and future calls to `findOneExecutable` with the same parameters will return +this path. + +!!! info + + On Windows, the resulting path will contain the first found executable + extension as identified by the environment variable `%PathExt%`. + +!!! example + + ``` + {{ if findOneExecutable (list "eza" "exa") (list "bin" "go/bin" ".cargo/bin" ".local/bin") }} + # $HOME/.cargo/bin/exa exists and will probably be in $PATH after apply + {{ end }} + ``` diff --git a/assets/chezmoi.io/mkdocs.yml b/assets/chezmoi.io/mkdocs.yml index 5ea502d744b..0d890b0b049 100644 --- a/assets/chezmoi.io/mkdocs.yml +++ b/assets/chezmoi.io/mkdocs.yml @@ -187,6 +187,8 @@ nav: - deleteValueAtPath: reference/templates/functions/deleteValueAtPath.md - encrypt: reference/templates/functions/encrypt.md - eqFold: reference/templates/functions/eqFold.md + - findExecutable: reference/templates/functions/findExecutable.md + - findOneExecutable: reference/templates/functions/findOneExecutable.md - fromIni: reference/templates/functions/fromIni.md - fromJsonc: reference/templates/functions/fromJsonc.md - fromToml: reference/templates/functions/fromToml.md diff --git a/internal/chezmoi/chezmoi_unix.go b/internal/chezmoi/chezmoi_unix.go index 80a3fe50556..6808bfe672a 100644 --- a/internal/chezmoi/chezmoi_unix.go +++ b/internal/chezmoi/chezmoi_unix.go @@ -15,6 +15,12 @@ func init() { unix.Umask(int(Umask)) } +// findExecutableExtensions returns valid OS executable extensions, on unix it +// can be anything. +func findExecutableExtensions(path string) []string { + return []string{path} +} + // IsExecutable returns if fileInfo is executable. func IsExecutable(fileInfo fs.FileInfo) bool { return fileInfo.Mode().Perm()&0o111 != 0 diff --git a/internal/chezmoi/chezmoi_windows.go b/internal/chezmoi/chezmoi_windows.go index 6d0cd141e09..c6fad0afcca 100644 --- a/internal/chezmoi/chezmoi_windows.go +++ b/internal/chezmoi/chezmoi_windows.go @@ -13,6 +13,22 @@ const nativeLineEnding = "\r\n" var pathExts = strings.Split(os.Getenv("PATHEXT"), string(filepath.ListSeparator)) +// findExecutableExtensions returns valid OS executable extensions for the +// provided file if it does not already have an extension. The executable +// extensions are derived from %PathExt%. +func findExecutableExtensions(path string) []string { + cmdExt := filepath.Ext(path) + if cmdExt != "" { + return []string{path} + } + result := make([]string, len(pathExts)) + withoutSuffix := strings.TrimSuffix(path, cmdExt) + for i, ext := range pathExts { + result[i] = withoutSuffix + ext + } + return result +} + // IsExecutable checks if the file is a regular file and has an extension listed // in the PATHEXT environment variable as per // https://www.nextofwindows.com/what-is-pathext-environment-variable-in-windows. diff --git a/internal/chezmoi/findexecutable.go b/internal/chezmoi/findexecutable.go new file mode 100644 index 00000000000..d79e1eeca53 --- /dev/null +++ b/internal/chezmoi/findexecutable.go @@ -0,0 +1,66 @@ +package chezmoi + +import ( + "os" + "path/filepath" + "strings" + "sync" +) + +var ( + foundExecutableCacheMutex sync.Mutex + foundExecutableCache = make(map[string]string) +) + +// FindExecutable is like LookPath except that: +// +// - You can specify the needle as `string`, `[]string`, or `[]interface{}` +// (that converts to `[]string`). +// - You specify the haystack instead of relying on `$PATH`/`%PATH%`. +// +// This makes it useful for the resulting path of shell configurations +// managed by chezmoi. +func FindExecutable(files, paths []string) (string, error) { + foundExecutableCacheMutex.Lock() + defer foundExecutableCacheMutex.Unlock() + + key := strings.Join(files, "\x00") + "\x01" + strings.Join(paths, "\x00") + + if path, ok := foundExecutableCache[key]; ok { + return path, nil + } + + var candidates []string + + for _, file := range files { + candidates = append(candidates, findExecutableExtensions(file)...) + } + + // based on /usr/lib/go-1.20/src/os/exec/lp_unix.go:52 + for _, candidatePath := range paths { + if candidatePath == "" { + continue + } + + for _, candidate := range candidates { + path := filepath.Join(candidatePath, candidate) + + info, err := os.Stat(path) + if err != nil { + continue + } + + // isExecutable doesn't care if it's a directory + if info.Mode().IsDir() { + continue + } + + if IsExecutable(info) { + foundExecutableCache[key] = path + return path, nil + } + } + } + + return "", nil +} diff --git a/internal/chezmoi/findexecutable_darwin_test.go b/internal/chezmoi/findexecutable_darwin_test.go new file mode 100644 index 00000000000..05a752341f1 --- /dev/null +++ b/internal/chezmoi/findexecutable_darwin_test.go @@ -0,0 +1,62 @@ +package chezmoi + +import ( + "fmt" + "testing" + + "github.com/alecthomas/assert/v2" +) + +func TestFindExecutable(t *testing.T) { + tests := []struct { + files []string + paths []string + expected string + }{ + { + files: []string{"sh"}, + paths: []string{"/usr/bin", "/bin"}, + expected: "/bin/sh", + }, + { + files: []string{"sh"}, + paths: []string{"/bin", "/usr/bin"}, + expected: "/bin/sh", + }, + { + files: []string{"chezmoish"}, + paths: []string{"/bin", "/usr/bin"}, + expected: "", + }, + + { + files: []string{"chezmoish", "sh"}, + paths: []string{"/usr/bin", "/bin"}, + expected: "/bin/sh", + }, + { + files: []string{"chezmoish", "sh"}, + paths: []string{"/bin", "/usr/bin"}, + expected: "/bin/sh", + }, + { + files: []string{"chezmoish", "chezvoush"}, + paths: []string{"/bin", "/usr/bin"}, + expected: "", + }, + } + + for _, test := range tests { + name := fmt.Sprintf( + "FindExecutable %#v in %#v as %#v", + test.files, + test.paths, + test.expected, + ) + t.Run(name, func(t *testing.T) { + actual, err := FindExecutable(test.files, test.paths) + assert.NoError(t, err) + assert.Equal(t, test.expected, actual) + }) + } +} diff --git a/internal/chezmoi/findexecutable_unix_test.go b/internal/chezmoi/findexecutable_unix_test.go new file mode 100644 index 00000000000..8e1cb6e6361 --- /dev/null +++ b/internal/chezmoi/findexecutable_unix_test.go @@ -0,0 +1,63 @@ +//go:build !windows && !darwin + +package chezmoi + +import ( + "fmt" + "testing" + + "github.com/alecthomas/assert/v2" +) + +func TestFindExecutable(t *testing.T) { + tests := []struct { + files []string + paths []string + expected string + }{ + { + files: []string{"yes"}, + paths: []string{"/usr/bin", "/bin"}, + expected: "/usr/bin/yes", + }, + { + files: []string{"sh"}, + paths: []string{"/bin", "/usr/bin"}, + expected: "/bin/sh", + }, + { + files: []string{"chezmoish"}, + paths: []string{"/bin", "/usr/bin"}, + expected: "", + }, + { + files: []string{"chezmoish", "yes"}, + paths: []string{"/usr/bin", "/bin"}, + expected: "/usr/bin/yes", + }, + { + files: []string{"chezmoish", "sh"}, + paths: []string{"/bin", "/usr/bin"}, + expected: "/bin/sh", + }, + { + files: []string{"chezmoish", "chezvoush"}, + paths: []string{"/bin", "/usr/bin"}, + expected: "", + }, + } + + for _, test := range tests { + name := fmt.Sprintf( + "FindExecutable %#v in %#v as %#v", + test.files, + test.paths, + test.expected, + ) + t.Run(name, func(t *testing.T) { + actual, err := FindExecutable(test.files, test.paths) + assert.NoError(t, err) + assert.Equal(t, test.expected, actual) + }) + } +} diff --git a/internal/chezmoi/findexecutable_windows_test.go b/internal/chezmoi/findexecutable_windows_test.go new file mode 100644 index 00000000000..fc6a72e4a53 --- /dev/null +++ b/internal/chezmoi/findexecutable_windows_test.go @@ -0,0 +1,101 @@ +//go:build windows + +package chezmoi + +import ( + "fmt" + "strings" + "testing" + + "github.com/alecthomas/assert/v2" +) + +func TestFindExecutable(t *testing.T) { + tests := []struct { + files []string + paths []string + expected string + }{ + { + files: []string{"powershell.exe"}, + paths: []string{ + "c:\\windows\\system32", + "c:\\windows\\system64", + "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0", + }, + expected: "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", + }, + { + files: []string{"powershell"}, + paths: []string{ + "c:\\windows\\system32", + "c:\\windows\\system64", + "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0", + }, + expected: "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", + }, + { + files: []string{"weakshell.exe"}, + paths: []string{ + "c:\\windows\\system32", + "c:\\windows\\system64", + "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0", + }, + expected: "", + }, + { + files: []string{"weakshell"}, + paths: []string{ + "c:\\windows\\system32", + "c:\\windows\\system64", + "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0", + }, + expected: "", + }, + { + files: []string{"weakshell.exe", "powershell.exe"}, + paths: []string{ + "c:\\windows\\system32", + "c:\\windows\\system64", + "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0", + }, + expected: "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", + }, + { + files: []string{"weakshell", "powershell"}, + paths: []string{ + "c:\\windows\\system32", + "c:\\windows\\system64", + "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0", + }, + expected: "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", + }, + { + files: []string{"weakshell.exe", "chezmoishell.exe"}, + paths: []string{ + "c:\\windows\\system32", + "c:\\windows\\system64", + "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0", + }, + expected: "", + }, + { + files: []string{"weakshell", "chezmoishell"}, + paths: []string{ + "c:\\windows\\system32", + "c:\\windows\\system64", + "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0", + }, + expected: "", + }, + } + + for _, test := range tests { + name := fmt.Sprintf("FindExecutable %v in %#v as %v", test.files, test.paths, test.expected) + t.Run(name, func(t *testing.T) { + actual, err := FindExecutable(test.files, test.paths) + assert.NoError(t, err) + assert.Equal(t, strings.ToLower(test.expected), strings.ToLower(actual)) + }) + } +} diff --git a/internal/cmd/config.go b/internal/cmd/config.go index fc13d2358c3..9e139f27ec2 100644 --- a/internal/cmd/config.go +++ b/internal/cmd/config.go @@ -408,6 +408,8 @@ func newConfig(options ...configOption) (*Config, error) { "ejsonDecryptWithKey": c.ejsonDecryptWithKeyTemplateFunc, "encrypt": c.encryptTemplateFunc, "eqFold": c.eqFoldTemplateFunc, + "findExecutable": c.findExecutableTemplateFunc, + "findOneExecutable": c.findOneExecutableTemplateFunc, "fromIni": c.fromIniTemplateFunc, "fromJsonc": c.fromJsoncTemplateFunc, "fromToml": c.fromTomlTemplateFunc, @@ -450,8 +452,8 @@ func newConfig(options ...configOption) (*Config, error) { "output": c.outputTemplateFunc, "pass": c.passTemplateFunc, "passFields": c.passFieldsTemplateFunc, - "passRaw": c.passRawTemplateFunc, "passhole": c.passholeTemplateFunc, + "passRaw": c.passRawTemplateFunc, "pruneEmptyDicts": c.pruneEmptyDictsTemplateFunc, "quoteList": c.quoteListTemplateFunc, "rbw": c.rbwTemplateFunc, diff --git a/internal/cmd/templatefuncs.go b/internal/cmd/templatefuncs.go index ea9db44e852..c55c00393f8 100644 --- a/internal/cmd/templatefuncs.go +++ b/internal/cmd/templatefuncs.go @@ -133,6 +133,40 @@ func (c *Config) eqFoldTemplateFunc(first, second string, more ...string) bool { return false } +func (c *Config) findExecutableTemplateFunc(file string, pathList []any) string { + files := []string{file} + paths, err := anySliceToStringSlice(pathList) + if err != nil { + panic(fmt.Errorf("path list: %w", err)) + } + + switch path, err := chezmoi.FindExecutable(files, paths); { + case err == nil: + return path + default: + panic(err) + } +} + +func (c *Config) findOneExecutableTemplateFunc(fileList, pathList []any) string { + files, err := anySliceToStringSlice(fileList) + if err != nil { + panic(fmt.Errorf("file list: %w", err)) + } + + paths, err := anySliceToStringSlice(pathList) + if err != nil { + panic(fmt.Errorf("path list: %w", err)) + } + + switch path, err := chezmoi.FindExecutable(files, paths); { + case err == nil: + return path + default: + panic(err) + } +} + func (c *Config) fromIniTemplateFunc(s string) map[string]any { file, err := ini.Load([]byte(s)) if err != nil { diff --git a/internal/cmd/testdata/scripts/templatefuncs.txtar b/internal/cmd/testdata/scripts/templatefuncs.txtar index 09e4de68945..50c58327f2e 100644 --- a/internal/cmd/testdata/scripts/templatefuncs.txtar +++ b/internal/cmd/testdata/scripts/templatefuncs.txtar @@ -78,6 +78,38 @@ stdout ^true$ exec chezmoi execute-template '{{ isExecutable "bin/not-executable" }}' stdout ^false$ +# test findExecutable template function to find in specified script varargs - success +[!windows] exec chezmoi execute-template '{{ findExecutable "echo" (list "/lib" "/bin" "/usr/bin") }}' +[!windows] stdout ^/bin/echo$ + +# test findOneExecutable template function to find in specified script varargs - success +[!windows] exec chezmoi execute-template '{{ findOneExecutable (list "chezmoish" "echo") (list "/lib" "/bin" "/usr/bin") }}' +[!windows] stdout ^/bin/echo$ + +# test findExecutable template function to find in specified script varargs - failure +[!windows] exec chezmoi execute-template '{{ findExecutable "echo" (list "/lib") }}' +[!windows] stdout ^$ + +# test findExecutable template function to find in specified script - success +[!windows] exec chezmoi execute-template '{{ findExecutable "echo" (list "/lib" "/bin" "/usr/bin") }}' +[!windows] stdout ^/bin/echo$ + +# test findExecutable template function to find in specified script - failure +[!windows] exec chezmoi execute-template '{{ findExecutable "echo" (list "/lib") }}' +[!windows] stdout ^$ + +# test findExecutable template function to find in specified script - success with extension +[windows] exec chezmoi execute-template '{{ findExecutable "git.exe" (list "c:\\windows\\system32" "c:\\windows\\system64" "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0" "C:\\Program Files\\Git\\cmd") }}' +[windows] stdout 'git' + +# test findExecutable template function to find in specified script - success without extension +[windows] exec chezmoi execute-template '{{ findExecutable "git" (list "c:\\windows\\system32" "c:\\windows\\system64" "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0" "C:\\Program Files\\Git\\cmd") }}' +[windows] stdout 'git' + +# test findExecutable template function to find in specified script - failure +[windows] exec chezmoi execute-template '{{ findExecutable "asdf" (list "c:\\windows\\system32" "c:\\windows\\system64" "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0" "C:\\Program Files\\Git\\cmd") }}' +[windows] stdout '^$' + # test lookPath template function to find in PATH exec chezmoi execute-template '{{ lookPath "go" }}' stdout go$exe diff --git a/internal/cmd/util.go b/internal/cmd/util.go index 1243005b0e9..1274375a24c 100644 --- a/internal/cmd/util.go +++ b/internal/cmd/util.go @@ -1,6 +1,7 @@ package cmd import ( + "reflect" "strings" "unicode" ) @@ -143,3 +144,20 @@ func upperSnakeCaseToCamelCaseMap[V any](m map[string]V) map[string]V { } return result } + +func flattenStringList(vpaths []any) []string { + var paths []string + for i := range vpaths { + switch path := vpaths[i].(type) { + case []string: + paths = append(paths, path...) + case string: + paths = append(paths, path) + case []any: + paths = append(paths, flattenStringList(path)...) + default: + panic("unknown type: " + reflect.TypeOf(path).String()) + } + } + return paths +} diff --git a/internal/cmd/util_test.go b/internal/cmd/util_test.go index 7e9841edbf1..80cb30478ea 100644 --- a/internal/cmd/util_test.go +++ b/internal/cmd/util_test.go @@ -1,6 +1,8 @@ package cmd import ( + "reflect" + "strings" "testing" "github.com/alecthomas/assert/v2" @@ -148,3 +150,47 @@ func TestUpperSnakeCaseToCamelCaseMap(t *testing.T) { "id": "", }, actual) } + +func Test_flattenStringList(t *testing.T) { + tests := []struct { + name string + vpaths []any + want []string + }{ + { + name: "Nothing", + }, + { + name: "Just a string", + vpaths: []any{"1"}, + want: []string{"1"}, + }, + { + name: "Just a array of string", + vpaths: []any{[]string{"1", "2"}}, + want: []string{"1", "2"}, + }, + { + name: "Just a array of any containing string", + vpaths: []any{[]any{"1", "2"}}, + want: []string{"1", "2"}, + }, + { + name: "Just a array of any containing string", + vpaths: []any{[]any{"1", "2"}}, + want: []string{"1", "2"}, + }, + { + name: "Hybrid", + vpaths: []any{"0", []any{"1", "2"}, []any{[]string{"3", "4"}}, []any{[]any{"5", "6"}}}, + want: strings.Split("0123456", ""), + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := flattenStringList(tt.vpaths); !reflect.DeepEqual(got, tt.want) { + t.Errorf("flattenStringList() = %v, want %v", got, tt.want) + } + }) + } +}
feat
find[One]Executable in user-supplied paths
dc7caaca2f1a6ecfe42c061b1575c8befc5b0f22
2023-03-12 04:19:14
Oleksandr Redko
chore: Remove +build comments from modules
false
diff --git a/main.go b/main.go index 05764303c88..110724568aa 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,4 @@ //go:build go1.18 -// +build go1.18 //go:generate go run . completion bash -o completions/chezmoi-completion.bash //go:generate go run . completion fish -o completions/chezmoi.fish diff --git a/pkg/chezmoi/chezmoi_unix.go b/pkg/chezmoi/chezmoi_unix.go index 7c82368ac50..dd8a57d2683 100644 --- a/pkg/chezmoi/chezmoi_unix.go +++ b/pkg/chezmoi/chezmoi_unix.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows package chezmoi diff --git a/pkg/chezmoi/chezmoi_unix_test.go b/pkg/chezmoi/chezmoi_unix_test.go index c5ac159ef99..2b12bd37c9e 100644 --- a/pkg/chezmoi/chezmoi_unix_test.go +++ b/pkg/chezmoi/chezmoi_unix_test.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows package chezmoi diff --git a/pkg/chezmoi/path_unix.go b/pkg/chezmoi/path_unix.go index a36f59a20ae..371467cc565 100644 --- a/pkg/chezmoi/path_unix.go +++ b/pkg/chezmoi/path_unix.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows package chezmoi diff --git a/pkg/chezmoi/realsystem_unix.go b/pkg/chezmoi/realsystem_unix.go index 31c99a2c960..375ff019908 100644 --- a/pkg/chezmoi/realsystem_unix.go +++ b/pkg/chezmoi/realsystem_unix.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows package chezmoi diff --git a/pkg/chezmoitest/chezmoitest_unix.go b/pkg/chezmoitest/chezmoitest_unix.go index 1f444fbcef7..e45b6110f78 100644 --- a/pkg/chezmoitest/chezmoitest_unix.go +++ b/pkg/chezmoitest/chezmoitest_unix.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows package chezmoitest diff --git a/pkg/cmd/doctorcmd_unix.go b/pkg/cmd/doctorcmd_unix.go index 6f78373101b..84f9a49edbc 100644 --- a/pkg/cmd/doctorcmd_unix.go +++ b/pkg/cmd/doctorcmd_unix.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows package cmd diff --git a/pkg/cmd/keyringtemplatefuncs.go b/pkg/cmd/keyringtemplatefuncs.go index 92b198cb1e5..d023b0fe8ba 100644 --- a/pkg/cmd/keyringtemplatefuncs.go +++ b/pkg/cmd/keyringtemplatefuncs.go @@ -1,5 +1,4 @@ //go:build !freebsd || (freebsd && cgo) -// +build !freebsd freebsd,cgo package cmd diff --git a/pkg/cmd/keyringtemplatefuncs_freebsdnocgo.go b/pkg/cmd/keyringtemplatefuncs_freebsdnocgo.go index a836412f709..a4f00300d6f 100644 --- a/pkg/cmd/keyringtemplatefuncs_freebsdnocgo.go +++ b/pkg/cmd/keyringtemplatefuncs_freebsdnocgo.go @@ -1,5 +1,4 @@ //go:build freebsd && !cgo -// +build freebsd,!cgo package cmd diff --git a/pkg/cmd/noupgradecmd.go b/pkg/cmd/noupgradecmd.go index 551b4da239e..4e8ece467b9 100644 --- a/pkg/cmd/noupgradecmd.go +++ b/pkg/cmd/noupgradecmd.go @@ -1,5 +1,4 @@ //go:build noupgrade -// +build noupgrade package cmd diff --git a/pkg/cmd/secretkeyringcmd.go b/pkg/cmd/secretkeyringcmd.go index 34b8f88b77a..b0498a9db7c 100644 --- a/pkg/cmd/secretkeyringcmd.go +++ b/pkg/cmd/secretkeyringcmd.go @@ -1,5 +1,4 @@ //go:build !freebsd || (freebsd && cgo) -// +build !freebsd freebsd,cgo package cmd diff --git a/pkg/cmd/secretkeyringcmd_freebsdnocgo.go b/pkg/cmd/secretkeyringcmd_freebsdnocgo.go index 96f9d3dd6ce..3da5dab0ceb 100644 --- a/pkg/cmd/secretkeyringcmd_freebsdnocgo.go +++ b/pkg/cmd/secretkeyringcmd_freebsdnocgo.go @@ -1,5 +1,4 @@ //go:build freebsd && !cgo -// +build freebsd,!cgo package cmd diff --git a/pkg/cmd/upgradecmd.go b/pkg/cmd/upgradecmd.go index 438eeca9f21..7d3d1e54daf 100644 --- a/pkg/cmd/upgradecmd.go +++ b/pkg/cmd/upgradecmd.go @@ -1,5 +1,4 @@ //go:build !noupgrade -// +build !noupgrade package cmd diff --git a/pkg/cmd/upgradecmd_test.go b/pkg/cmd/upgradecmd_test.go index 6fcba08ec27..3046a90cb3d 100644 --- a/pkg/cmd/upgradecmd_test.go +++ b/pkg/cmd/upgradecmd_test.go @@ -1,5 +1,4 @@ //go:build !noupgrade && !windows -// +build !noupgrade,!windows package cmd diff --git a/pkg/cmd/util_unix.go b/pkg/cmd/util_unix.go index 4abc6770393..6a191a27e84 100644 --- a/pkg/cmd/util_unix.go +++ b/pkg/cmd/util_unix.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows package cmd diff --git a/pkg/shell/shell_darwin.go b/pkg/shell/shell_darwin.go index f647bb0ebea..29e8289b679 100644 --- a/pkg/shell/shell_darwin.go +++ b/pkg/shell/shell_darwin.go @@ -1,5 +1,4 @@ //go:build darwin -// +build darwin package shell diff --git a/pkg/shell/shell_plan9.go b/pkg/shell/shell_plan9.go index 2ffbaee3d92..99149929a1b 100644 --- a/pkg/shell/shell_plan9.go +++ b/pkg/shell/shell_plan9.go @@ -1,5 +1,4 @@ //go:build plan9 -// +build plan9 package shell diff --git a/pkg/shell/shell_posix.go b/pkg/shell/shell_posix.go index ecd8fa3edd9..740bb054746 100644 --- a/pkg/shell/shell_posix.go +++ b/pkg/shell/shell_posix.go @@ -1,5 +1,4 @@ //go:build !darwin && !plan9 && !windows -// +build !darwin,!plan9,!windows package shell diff --git a/pkg/shell/shellcgo.go b/pkg/shell/shellcgo.go index 284759a9c3b..df6c5ce6c79 100644 --- a/pkg/shell/shellcgo.go +++ b/pkg/shell/shellcgo.go @@ -1,5 +1,4 @@ //go:build (cgo && aix) || (cgo && android) || (cgo && darwin) || (cgo && dragonfly) || (cgo && freebsd) || (cgo && illumos) || (cgo && linux) || (cgo && netbsd) || (cgo && openbsd) || (cgo && solaris) -// +build cgo,aix cgo,android cgo,darwin cgo,dragonfly cgo,freebsd cgo,illumos cgo,linux cgo,netbsd cgo,openbsd cgo,solaris package shell diff --git a/pkg/shell/shellnocgo.go b/pkg/shell/shellnocgo.go index 4a22cf09dd0..22e9511fc88 100644 --- a/pkg/shell/shellnocgo.go +++ b/pkg/shell/shellnocgo.go @@ -1,5 +1,4 @@ //go:build !cgo -// +build !cgo package shell
chore
Remove +build comments from modules
9d0096b1e6216fa1c810b6a0aa1810ca7fde0136
2023-04-21 17:46:04
Tom Payne
feat: Add .chezmoi.config template variable
false
diff --git a/assets/chezmoi.io/docs/reference/templates/variables.md b/assets/chezmoi.io/docs/reference/templates/variables.md index f1ba9ae9fb2..1ce069ab148 100644 --- a/assets/chezmoi.io/docs/reference/templates/variables.md +++ b/assets/chezmoi.io/docs/reference/templates/variables.md @@ -7,6 +7,7 @@ chezmoi provides the following automatically-populated variables: | `.chezmoi.arch` | string | Architecture, e.g. `amd64`, `arm`, etc. as returned by [runtime.GOARCH](https://pkg.go.dev/runtime?tab=doc#pkg-constants) | | `.chezmoi.args` | []string | The arguments passed to the `chezmoi` command, starting with the program command | | `.chezmoi.cacheDir` | string | The cache directory | +| `.chezmoi.config` | object | The configuration, as read from the config file | | `.chezmoi.configFile` | string | The path to the configuration file used by chezmoi | | `.chezmoi.executable` | string | The path to the `chezmoi` executable, if available | | `.chezmoi.fqdnHostname` | string | The fully-qualified domain name hostname of the machine chezmoi is running on | diff --git a/pkg/cmd/config.go b/pkg/cmd/config.go index 83d8056ac4d..80fc38dc584 100644 --- a/pkg/cmd/config.go +++ b/pkg/cmd/config.go @@ -237,6 +237,7 @@ type templateData struct { Args []string `json:"args"` CacheDir chezmoi.AbsPath `json:"cacheDir"` Command string `json:"command"` + Config ConfigFile `json:"config"` ConfigFile chezmoi.AbsPath `json:"configFile"` Executable chezmoi.AbsPath `json:"executable"` FQDNHostname string `json:"fqdnHostname"` @@ -1279,6 +1280,7 @@ func (c *Config) getTemplateDataMap(cmd *cobra.Command) map[string]any { "args": templateData.Args, "cacheDir": templateData.CacheDir.String(), "command": templateData.Command, + "config": templateData.Config, "configFile": templateData.ConfigFile.String(), "executable": templateData.Executable.String(), "fqdnHostname": templateData.FQDNHostname, @@ -2082,6 +2084,7 @@ func (c *Config) newTemplateData(cmd *cobra.Command) *templateData { Args: os.Args, CacheDir: c.CacheDirAbsPath, Command: cmd.Name(), + Config: c.ConfigFile, ConfigFile: c.configFileAbsPath, Executable: chezmoi.NewAbsPath(executable), FQDNHostname: fqdnHostname,
feat
Add .chezmoi.config template variable
3697fc9897ade0bde04e75830db212579d0c6f8b
2024-02-07 01:01:39
Tom Payne
chore: Use per-job permissions for GitHub Actions
false
diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml index fa2734845c1..325f14f4439 100644 --- a/.github/workflows/govulncheck.yml +++ b/.github/workflows/govulncheck.yml @@ -13,6 +13,8 @@ on: jobs: govulncheck: runs-on: ubuntu-22.04 + permissions: + contents: read steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - name: go-version diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index d2573201484..62f9d0f2272 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -14,6 +14,9 @@ concurrency: jobs: action: runs-on: ubuntu-22.04 + permissions: + issues: write + pull-requests: write steps: - uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 with: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b6688baf671..17a62ff267c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,6 +25,8 @@ jobs: runs-on: ubuntu-20.04 outputs: code: ${{ steps.filter.outputs.code }} + permissions: + contents: read steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: filter @@ -59,6 +61,8 @@ jobs: - uses: github/codeql-action/analyze@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 misspell: runs-on: ubuntu-22.04 + permissions: + contents: read steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: reviewdog/action-misspell@06d6a480724fa783c220081bbc22336a78dbbe82 @@ -68,6 +72,8 @@ jobs: needs: changes if: github.event_name == 'push' || needs.changes.outputs.code == 'true' runs-on: ubuntu-20.04 + permissions: + contents: read steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - name: test @@ -79,6 +85,8 @@ jobs: needs: changes if: github.event_name == 'push' || needs.changes.outputs.code == 'true' runs-on: ubuntu-20.04 + permissions: + contents: read steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - name: test @@ -90,6 +98,8 @@ jobs: needs: changes if: github.event_name == 'push' || needs.changes.outputs.code == 'true' runs-on: macos-11 + permissions: + contents: read steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 @@ -127,6 +137,8 @@ jobs: needs: changes if: github.event_name == 'push' || needs.changes.outputs.code == 'true' runs-on: ubuntu-20.04 + permissions: + contents: read steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 @@ -158,6 +170,8 @@ jobs: test-release: needs: changes runs-on: ubuntu-20.04 + permissions: + contents: read steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 with: @@ -221,6 +235,8 @@ jobs: test-ubuntu: needs: changes runs-on: ubuntu-20.04 + permissions: + contents: read steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 with: @@ -267,6 +283,8 @@ jobs: bin/chezmoi --version test-website: runs-on: ubuntu-20.04 + permissions: + contents: read steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 @@ -283,6 +301,8 @@ jobs: needs: changes if: github.event_name == 'push' || needs.changes.outputs.code == 'true' runs-on: windows-2022 + permissions: + contents: read steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 @@ -322,6 +342,8 @@ jobs: bin/chezmoi.exe --version check: runs-on: ubuntu-20.04 + permissions: + contents: read steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 with: @@ -368,6 +390,8 @@ jobs: needs: changes if: github.event_name == 'push' || needs.changes.outputs.code == 'true' runs-on: ubuntu-20.04 + permissions: + contents: read steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 @@ -391,6 +415,8 @@ jobs: - test-website - test-windows runs-on: ubuntu-20.04 + permissions: + contents: write steps: - name: install-build-dependencies run: | @@ -434,6 +460,8 @@ jobs: needs: - release runs-on: ubuntu-20.04 + permissions: + contents: read steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 with:
chore
Use per-job permissions for GitHub Actions
b59f12781735c8cfa80ae550648b1a2ecbbba1e4
2022-08-27 19:44:16
Tom Payne
fix: Detect SSH clones from URL when using builtin git
false
diff --git a/pkg/cmd/initcmd.go b/pkg/cmd/initcmd.go index 30a9dc60e5b..f63a27dbe53 100644 --- a/pkg/cmd/initcmd.go +++ b/pkg/cmd/initcmd.go @@ -243,7 +243,11 @@ func (c *Config) runInitCmd(cmd *cobra.Command, args []string) error { // builtinGitClone clones a repo using the builtin git command. func (c *Config) builtinGitClone(username, url string, workingTreeRawPath chezmoi.AbsPath) error { - if c.init.ssh { + endpoint, err := transport.NewEndpoint(url) + if err != nil { + return err + } + if c.init.ssh || endpoint.Protocol == "ssh" { return errors.New("builtin git does not support cloning repos over ssh, please install git") }
fix
Detect SSH clones from URL when using builtin git
92ce33c18a0f5088ec3827f215f647aa1b9340de
2021-10-12 01:03:10
Tom Payne
feat: Add decrypt and encrypt template functions
false
diff --git a/docs/REFERENCE.md b/docs/REFERENCE.md index 44e9c29c23f..2f118b8c69a 100644 --- a/docs/REFERENCE.md +++ b/docs/REFERENCE.md @@ -98,6 +98,8 @@ Manage your dotfiles across multiple machines, securely. * [`bitwarden` [*arg*...]](#bitwarden-arg) * [`bitwardenAttachment` *filename* *itemid*](#bitwardenattachment-filename-itemid) * [`bitwardenFields` [*arg*...]](#bitwardenfields-arg) + * [`decrypt` *ciphertext*](#decrypt-ciphertext) + * [`encrypt` *plaintext*](#encrypt-plaintext) * [`gitHubKeys` *user*](#githubkeys-user) * [`gopass` *gopass-name*](#gopass-gopass-name) * [`gopassRaw` *gopass-name*](#gopassraw-gopass-name) @@ -1888,6 +1890,24 @@ the same arguments will only invoke `bw get` once. --- +### `decrypt` *ciphertext* + +`decrypt` decrypts *ciphertext* using chezmoi's configured encryption method. + +#### `decrypt` examples + +``` +{{ joinPath .chezmoi.sourceDir ".ignored-encrypted-file.age" | include | decrypt }} +``` + +--- + +### `encrypt` *plaintext* + +`encrypt` encrypts *plaintext* using chezmoi's configured encryption method. + +--- + ### `gitHubKeys` *user* `gitHubKeys` returns *user*'s public SSH keys from GitHub using the GitHub API. diff --git a/internal/cmd/config.go b/internal/cmd/config.go index b3ee8066d5f..7f08777a537 100644 --- a/internal/cmd/config.go +++ b/internal/cmd/config.go @@ -388,6 +388,8 @@ func newConfig(options ...configOption) (*Config, error) { "bitwarden": c.bitwardenTemplateFunc, "bitwardenAttachment": c.bitwardenAttachmentTemplateFunc, "bitwardenFields": c.bitwardenFieldsTemplateFunc, + "decrypt": c.decryptTemplateFunc, + "encrypt": c.encryptTemplateFunc, "gitHubKeys": c.gitHubKeysTemplateFunc, "gopass": c.gopassTemplateFunc, "gopassRaw": c.gopassRawTemplateFunc, diff --git a/internal/cmd/encryptiontemplatefuncs.go b/internal/cmd/encryptiontemplatefuncs.go new file mode 100644 index 00000000000..655bac43223 --- /dev/null +++ b/internal/cmd/encryptiontemplatefuncs.go @@ -0,0 +1,19 @@ +package cmd + +func (c *Config) decryptTemplateFunc(ciphertext string) string { + plaintextBytes, err := c.encryption.Decrypt([]byte(ciphertext)) + if err != nil { + returnTemplateError(err) + return "" + } + return string(plaintextBytes) +} + +func (c *Config) encryptTemplateFunc(plaintext string) string { + ciphertextBytes, err := c.encryption.Encrypt([]byte(plaintext)) + if err != nil { + returnTemplateError(err) + return "" + } + return string(ciphertextBytes) +} diff --git a/internal/cmd/testdata/scripts/config.txt b/internal/cmd/testdata/scripts/config.txt index f63458ed085..e23bef76246 100644 --- a/internal/cmd/testdata/scripts/config.txt +++ b/internal/cmd/testdata/scripts/config.txt @@ -20,7 +20,7 @@ stdout 'sourceDir: .*/config/source' chezmoi data --config=$CHEZMOICONFIGDIR/chezmoi.yaml --format=yaml stdout 'sourceDir: .*/config2/source' -[windows] skip 'remaining tests require /dev/stdin' +[windows] stop 'remaining tests require /dev/stdin' # test that chezmoi can read the config from stdin stdin home2/user/.config/chezmoi/chezmoi.yaml diff --git a/internal/cmd/testdata/scripts/encryptiontemplatefuncs.txt b/internal/cmd/testdata/scripts/encryptiontemplatefuncs.txt new file mode 100644 index 00000000000..a1e7034cca1 --- /dev/null +++ b/internal/cmd/testdata/scripts/encryptiontemplatefuncs.txt @@ -0,0 +1,21 @@ +[!exec:age] skip 'age not found in $PATH' + +mkageconfig + +# test encrypt template function +chezmoi execute-template '{{ "plaintext" | encrypt }}' +stdout '-----BEGIN AGE ENCRYPTED FILE-----' + +# test encrypt and decrypt template function round trip +chezmoi execute-template '{{ "plaintext\n" | encrypt | decrypt }}' +cmp stdout golden/plaintext + +[windows] stop 'remaining tests rely on UNIX path handling' # FIXME + +# test decrypt template function +chezmoi encrypt --output=$HOME${/}ciphertext.age golden/plaintext +chezmoi execute-template '{{ joinPath (env "HOME") "ciphertext.age" | include | decrypt }}' +cmp stdout golden/plaintext + +-- golden/plaintext -- +plaintext diff --git a/internal/cmd/testdata/scripts/externalguess.txt b/internal/cmd/testdata/scripts/externalguess.txt index 9d7ec4438c6..6c73a4e9725 100644 --- a/internal/cmd/testdata/scripts/externalguess.txt +++ b/internal/cmd/testdata/scripts/externalguess.txt @@ -20,8 +20,7 @@ cp www/archive.tar.gz www/archive chezmoi apply --force --refresh-externals cmp $HOME/.dir/dir/file golden/dir/file -# remaining tests require zip -[!exec:zip] skip 'zip not found in $PATH' +[!exec:zip] stop 'zip not found in $PATH' # test that chezmoi sniffs the format of zip files exec zip -r www/archive.zip archive
feat
Add decrypt and encrypt template functions
529e988797c11984b94b0754d0cf4135d930707e
2023-07-28 21:23:58
Tom Payne
chore: Update dependencies
false
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c54b951f15d..acd5e0bf31e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ env: GOLINES_VERSION: 0.11.0 GOVERSIONINFO_VERSION: 1.4.0 FINDTYPOS_VERSION: 0.0.1 - MKDOCS_VERSION: 1.4.3 + MKDOCS_VERSION: 1.5.1 jobs: changes: runs-on: ubuntu-20.04 diff --git a/go.mod b/go.mod index 732a72332de..d07deffb66b 100644 --- a/go.mod +++ b/go.mod @@ -9,9 +9,9 @@ require ( github.com/Masterminds/sprig/v3 v3.2.3 github.com/Shopify/ejson v1.4.1 github.com/alecthomas/assert/v2 v2.3.0 - github.com/aws/aws-sdk-go-v2 v1.19.0 - github.com/aws/aws-sdk-go-v2/config v1.18.28 - github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.19.11 + github.com/aws/aws-sdk-go-v2 v1.19.1 + github.com/aws/aws-sdk-go-v2/config v1.18.30 + github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.19.12 github.com/bmatcuk/doublestar/v4 v4.6.0 github.com/bradenhilton/mozillainstallhash v1.0.1 github.com/charmbracelet/bubbles v0.16.1 @@ -19,7 +19,7 @@ require ( github.com/charmbracelet/glamour v0.6.0 github.com/coreos/go-semver v0.3.1 github.com/fsnotify/fsnotify v1.6.0 - github.com/go-git/go-git/v5 v5.7.0 + github.com/go-git/go-git/v5 v5.8.1 github.com/google/go-github/v53 v53.2.0 github.com/google/renameio/v2 v2.0.0 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 @@ -44,7 +44,7 @@ require ( go.etcd.io/bbolt v1.3.7 go.uber.org/multierr v1.11.0 golang.org/x/crypto v0.11.0 - golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 + golang.org/x/exp v0.0.0-20230725093048-515e97ebf090 golang.org/x/oauth2 v0.10.0 golang.org/x/sync v0.3.0 golang.org/x/sys v0.10.0 @@ -56,7 +56,8 @@ require ( ) require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1 // indirect + dario.cat/mergo v1.0.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v0.8.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect @@ -67,17 +68,17 @@ require ( github.com/acomagu/bufpipe v1.0.4 // indirect github.com/alecthomas/chroma v0.10.0 // indirect github.com/alecthomas/repr v0.2.0 // indirect - github.com/alessio/shellescape v1.4.1 // indirect + github.com/alessio/shellescape v1.4.2 // indirect github.com/atotto/clipboard v0.1.4 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.27 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.5 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.35 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.29 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.3.36 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.29 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.12.13 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.13 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.19.3 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.29 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.6 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.36 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.30 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.3.37 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.30 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.12.14 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.14 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.20.1 // indirect github.com/aws/smithy-go v1.13.5 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/aymerick/douceur v0.2.0 // indirect @@ -112,7 +113,7 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/mattn/go-localereader v0.0.1 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/microcosm-cc/bluemonday v1.0.25 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect @@ -129,7 +130,7 @@ require ( github.com/skeema/knownhosts v1.2.0 // indirect github.com/spf13/cast v1.5.1 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - github.com/yuin/goldmark v1.5.4 // indirect + github.com/yuin/goldmark v1.5.5 // indirect github.com/yuin/goldmark-emoji v1.0.2 // indirect golang.org/x/mod v0.12.0 // indirect golang.org/x/net v0.12.0 // indirect diff --git a/go.sum b/go.sum index 2afacc1bdca..366ccedd8ee 100644 --- a/go.sum +++ b/go.sum @@ -2,12 +2,14 @@ cloud.google.com/go/compute v1.20.1 h1:6aKEtlUiwEpJzM001l0yFkpXmUVXaN8W+fbkb2AZN cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= filippo.io/age v1.1.1 h1:pIpO7l151hCnQ4BdyBujnGP2YlUo0uj6sAVNHGBvXHg= filippo.io/age v1.1.1/go.mod h1:l03SrzDUrBkdBx8+IILdnn2KZysqQdbEBUQ4p3sqEQE= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1 h1:SEy2xmstIphdPwNBUi7uhvjyjhVKISfwjfOJmuy7kg4= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 h1:8q4SaHjFsClSvuVne0ID/5Ka8u3fcIHyqkLjcFpNRHQ= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= @@ -40,38 +42,38 @@ github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbf github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= -github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= -github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= +github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= +github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= -github.com/aws/aws-sdk-go-v2 v1.19.0 h1:klAT+y3pGFBU/qVf1uzwttpBbiuozJYWzNLHioyDJ+k= -github.com/aws/aws-sdk-go-v2 v1.19.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= -github.com/aws/aws-sdk-go-v2/config v1.18.28 h1:TINEaKyh1Td64tqFvn09iYpKiWjmHYrG1fa91q2gnqw= -github.com/aws/aws-sdk-go-v2/config v1.18.28/go.mod h1:nIL+4/8JdAuNHEjn/gPEXqtnS02Q3NXB/9Z7o5xE4+A= -github.com/aws/aws-sdk-go-v2/credentials v1.13.27 h1:dz0yr/yR1jweAnsCx+BmjerUILVPQ6FS5AwF/OyG1kA= -github.com/aws/aws-sdk-go-v2/credentials v1.13.27/go.mod h1:syOqAek45ZXZp29HlnRS/BNgMIW6uiRmeuQsz4Qh2UE= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.5 h1:kP3Me6Fy3vdi+9uHd7YLr6ewPxRL+PU6y15urfTaamU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.5/go.mod h1:Gj7tm95r+QsDoN2Fhuz/3npQvcZbkEf5mL70n3Xfluc= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.35 h1:hMUCiE3Zi5AHrRNGf5j985u0WyqI6r2NULhUfo0N/No= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.35/go.mod h1:ipR5PvpSPqIqL5Mi82BxLnfMkHVbmco8kUwO2xrCi0M= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.29 h1:yOpYx+FTBdpk/g+sBU6Cb1H0U/TLEcYYp66mYqsPpcc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.29/go.mod h1:M/eUABlDbw2uVrdAn+UsI6M727qp2fxkp8K0ejcBDUY= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.36 h1:8r5m1BoAWkn0TDC34lUculryf7nUF25EgIMdjvGCkgo= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.36/go.mod h1:Rmw2M1hMVTwiUhjwMoIBFWFJMhvJbct06sSidxInkhY= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.29 h1:IiDolu/eLmuB18DRZibj77n1hHQT7z12jnGO7Ze3pLc= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.29/go.mod h1:fDbkK4o7fpPXWn8YAPmTieAMuB9mk/VgvW64uaUqxd4= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.19.11 h1:g2uwGxEXNsjd2OJHIW1KrP4q/BAUcyn6440LQ9gR+nQ= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.19.11/go.mod h1:ywwMMBG8ioLfw1LccY05t/egwONbtwDkoUVuXNgDZjs= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.13 h1:sWDv7cMITPcZ21QdreULwxOOAmE05JjEsT6fCDtDA9k= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.13/go.mod h1:DfX0sWuT46KpcqbMhJ9QWtxAIP1VozkDWf8VAkByjYY= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.13 h1:BFubHS/xN5bjl818QaroN6mQdjneYQ+AOx44KNXlyH4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.13/go.mod h1:BzqsVVFduubEmzrVtUFQQIQdFqvUItF8XUq2EnS8Wog= -github.com/aws/aws-sdk-go-v2/service/sts v1.19.3 h1:e5mnydVdCVWxP+5rPAGi2PYxC7u2OZgH1ypC114H04U= -github.com/aws/aws-sdk-go-v2/service/sts v1.19.3/go.mod h1:yVGZA1CPkmUhBdA039jXNJJG7/6t+G+EBWmFq23xqnY= +github.com/aws/aws-sdk-go-v2 v1.19.1 h1:STs0lbbpXu3byTPcnRLghs2DH0yk9qKDo27TyyJSKsM= +github.com/aws/aws-sdk-go-v2 v1.19.1/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= +github.com/aws/aws-sdk-go-v2/config v1.18.30 h1:TTAXQIn31qYFUQjkW6siVrRTX1ux+sADZDOe3jsZcMg= +github.com/aws/aws-sdk-go-v2/config v1.18.30/go.mod h1:+YogjT7e/t9JVu/sOnZZgxTge1G+bPNk8zOaI0QIQvE= +github.com/aws/aws-sdk-go-v2/credentials v1.13.29 h1:KNgCpThGuZyCjq9EuuqoLDenKKMwO/x1Xx01ckDa7VI= +github.com/aws/aws-sdk-go-v2/credentials v1.13.29/go.mod h1:VMq1LcmSEa9qxBlOCYTjVuGJWEEzhGmgL552jQsmhss= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.6 h1:kortK122LvTU34CGX/F9oJpelXKkEA2j/MW48II+8+8= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.6/go.mod h1:k7IPHyHNIASI0m0RwOmCjWOTtgG+J0raqwuHH8WhWJE= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.36 h1:kbk81RlPoC6e4co7cQx2FAvH9TgbzxIqCqiosAFiB+w= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.36/go.mod h1:T8Jsn/uNL/AFOXrVYQ1YQaN1r9gN34JU1855/Lyjv+o= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.30 h1:lMl8S5SB8jNCB+Sty2Em4lnu3IJytceHQd7qbmfqKL0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.30/go.mod h1:v3GSCnFxbHzt9dlWBqvA1K1f9lmWuf4ztupZBCAIVs4= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.37 h1:BXiqvN7WuV/pMhz8CivhO8cG8icJcjnjHumif4ukQ0c= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.37/go.mod h1:d4GZ62cjnz/hjKFdAu11gAwK73bdhqaFv2O4J1gaqIs= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.30 h1:UcVZxLVNY4yayCmiG94Ge3l2qbc5WEB/oa4RmjoQEi0= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.30/go.mod h1:wPffyJiWWtHwvpFyn23WjAjVjMnlQOQrl02+vutBh3Y= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.19.12 h1:2C2a9VVs2Ob1I09GsmsKVvmlw5aebPj4yGfJX8EWMrk= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.19.12/go.mod h1:cglZ7TL22WrrkFCyDqD0X8GrByvmkOXXfkcRjj0ZkVA= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.14 h1:gUjz7trfz9qBm0AlkKTvJHBXELi1wvw+2LA9GfD2AsM= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.14/go.mod h1:9kfRdJgLCbnyeqZ/DpaSwcgj9ZDYLfRpe8Sze+NrYfQ= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.14 h1:8bEtxV5UT9ucdWGXfZ7CM3caQhSHGjWnTHt0OeF7m7s= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.14/go.mod h1:nd9BG2UnexN2sDx/mk2Jd6pf3d2E61AiA8m8Fdvdx8Y= +github.com/aws/aws-sdk-go-v2/service/sts v1.20.1 h1:U7h9CPoyMfVoN5jUglB0LglCMP10AK4vMBsbsCKM8Yw= +github.com/aws/aws-sdk-go-v2/service/sts v1.20.1/go.mod h1:BUHusg4cOA1TFGegj7x8/eoWrbdHzJfoMrXcbMQAG0k= github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aymanbagabas/go-osc52 v1.0.3 h1:DTwqENW7X9arYimJrPeGZcV0ln14sGMt3pHZspWD+Mg= @@ -141,8 +143,8 @@ github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8 github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f h1:Pz0DHeFij3XFhoBRGUDPzSJ+w2UcK5/0JvF8DRI58r8= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo= -github.com/go-git/go-git/v5 v5.7.0 h1:t9AudWVLmqzlo+4bqdf7GY+46SUuRsx59SboFxkq2aE= -github.com/go-git/go-git/v5 v5.7.0/go.mod h1:coJHKEOk5kUClpsNlXrUvPrDxY3w3gjHvhcZd8Fodw8= +github.com/go-git/go-git/v5 v5.8.1 h1:Zo79E4p7TRk0xoRgMq0RShiTHGKcKI4+DI6BfJc/Q+A= +github.com/go-git/go-git/v5 v5.8.1/go.mod h1:FHFuoD6yGz5OSKEBK+aWN9Oah0q54Jxl0abmj6GnqAo= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -233,8 +235,9 @@ github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2J github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/microcosm-cc/bluemonday v1.0.21/go.mod h1:ytNkv4RrDrLJ2pqlsSI46O6IVXmZOBBD4SaJyDwwTkM= github.com/microcosm-cc/bluemonday v1.0.25 h1:4NEwSfiJ+Wva0VxN5B8OwMicaJvD8r9tlJWm9rtloEg= github.com/microcosm-cc/bluemonday v1.0.25/go.mod h1:ZIOjCQp1OrzBBPIJmfX4qDYFuhU02nx4bn030ixfHLE= @@ -348,8 +351,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.7/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.5.2/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yuin/goldmark v1.5.4 h1:2uY/xC0roWy8IBEGLgB1ywIoEJFGmRrX21YQcvGZzjU= -github.com/yuin/goldmark v1.5.4/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yuin/goldmark v1.5.5 h1:IJznPe8wOzfIKETmMkd06F8nXkmlhaHqFRM9l1hAGsU= +github.com/yuin/goldmark v1.5.5/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark-emoji v1.0.1/go.mod h1:2w1E6FEWLcDQkoTE+7HU6QF1F6SLlNGjRIBbIZQFqkQ= github.com/yuin/goldmark-emoji v1.0.2 h1:c/RgTShNgHTtc6xdz2KKI74jJr6rWi7FPgnP9GAsO5s= github.com/yuin/goldmark-emoji v1.0.2/go.mod h1:RhP/RWpexdp+KHs7ghKnifRoIs/Bq4nDS7tRbCkOwKY= @@ -371,8 +374,8 @@ golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2Uz golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230725093048-515e97ebf090 h1:Di6/M8l0O2lCLc6VVRWhgCiApHV8MnQurBnFSHsQtNY= +golang.org/x/exp v0.0.0-20230725093048-515e97ebf090/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= diff --git a/internal/cmds/lint-txtar/main.go b/internal/cmds/lint-txtar/main.go index 38a1e16933a..6a336350a64 100644 --- a/internal/cmds/lint-txtar/main.go +++ b/internal/cmds/lint-txtar/main.go @@ -29,10 +29,10 @@ func lintFilenames(archiveFilename string, archive *txtar.Archive) error { return errs } -func sortFilesFunc(file1, file2 txtar.File) bool { +func sortFilesFunc(file1, file2 txtar.File) int { fileComponents1 := strings.Split(file1.Name, "/") fileComponents2 := strings.Split(file2.Name, "/") - return slices.Compare(fileComponents1, fileComponents2) < 0 + return slices.Compare(fileComponents1, fileComponents2) } func tidyTxtar(archiveFilename string) error { diff --git a/pkg/cmd/initcmd.go b/pkg/cmd/initcmd.go index 62e3357af75..3becbbf507d 100644 --- a/pkg/cmd/initcmd.go +++ b/pkg/cmd/initcmd.go @@ -277,6 +277,7 @@ func (c *Config) builtinGitClone(repoURLStr string, workingTreeRawPath chezmoi.A Depth: c.init.depth, ReferenceName: referenceName, RecurseSubmodules: git.DefaultSubmoduleRecursionDepth, + ShallowSubmodules: c.init.depth == 1, } for {
chore
Update dependencies
2626daed9ca879d7be8de82497b7c072424fd500
2023-10-01 13:09:07
dependabot[bot]
chore(deps): bump github/codeql-action from 2.21.5 to 2.21.9
false
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2a5cfcd932f..b0866919c17 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,10 +52,10 @@ jobs: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 with: fetch-depth: 1 - - uses: github/codeql-action/init@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 + - uses: github/codeql-action/init@ddccb873888234080b77e9bc2d4764d5ccaaccf9 with: languages: go - - uses: github/codeql-action/analyze@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 + - uses: github/codeql-action/analyze@ddccb873888234080b77e9bc2d4764d5ccaaccf9 misspell: runs-on: ubuntu-22.04 steps:
chore
bump github/codeql-action from 2.21.5 to 2.21.9
3d057e8cb86372880d1881994e220d1c55b497de
2023-01-02 20:10:28
Tom Payne
fix: Fix init --ssh
false
diff --git a/pkg/cmd/initcmd.go b/pkg/cmd/initcmd.go index 47625d55128..bdbfb2040c0 100644 --- a/pkg/cmd/initcmd.go +++ b/pkg/cmd/initcmd.go @@ -199,7 +199,7 @@ func (c *Config) runInitCmd(cmd *cobra.Command, args []string) error { "--depth", strconv.Itoa(c.init.depth), ) } - if !strings.HasPrefix(repoURLStr, "file://") { + if c.init.guessRepoURL && (strings.HasPrefix(repoURLStr, "http://") || strings.HasPrefix(repoURLStr, "https://")) { repoURL, err := url.Parse(repoURLStr) if err != nil { return err
fix
Fix init --ssh
ac214d0785c9c70479b55862c170e84818db0579
2024-05-13 14:32:18
Braden Hilton
chore: switch to Go for generate-commit
false
diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml index 614a7597436..bfff8ec3ce3 100644 --- a/.github/workflows/installer.yml +++ b/.github/workflows/installer.yml @@ -40,6 +40,7 @@ jobs: - uses: reviewdog/action-misspell@5bd7be2fc7ae56a517184f5c4bbcf2fd7afe3927 with: locale: US + ignore: ackward test-install-sh: if: ${{ needs.changes.outputs.sh == 'true' }} strategy: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2e6b80c831f..5662b16aea8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -44,7 +44,7 @@ jobs: - 'assets/**/*.tmpl' - 'assets/docker/**' - 'assets/scripts/*.py' - - 'assets/scripts/generate-commit.sh' + - 'assets/scripts/generate-commit.go' - 'assets/scripts/stow-to-chezmoi.sh' - 'assets/vagrant/**' - 'completions/**' @@ -73,6 +73,7 @@ jobs: - uses: reviewdog/action-misspell@5bd7be2fc7ae56a517184f5c4bbcf2fd7afe3927 with: locale: US + ignore: ackward test-alpine: needs: changes if: github.event_name == 'push' || needs.changes.outputs.code == 'true' diff --git a/.golangci.yml b/.golangci.yml index 6ab8e286f76..97e2be26cbf 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -137,6 +137,8 @@ linters-settings: enable-all: true misspell: locale: US + ignore-words: + - ackward stylecheck: checks: - all @@ -159,3 +161,7 @@ issues: - forcetypeassert - gosec path: _test\.go$ + - linters: + - forbidigo + - gosec + path: assets/scripts/generate-commit.go diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 157dd304172..3922cc56a82 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -2,7 +2,7 @@ project_name: chezmoi before: hooks: - - assets/scripts/generate-commit.sh -o COMMIT + - go run assets/scripts/generate-commit.go -o COMMIT - go mod download all builds: diff --git a/assets/chezmoi.io/docs/developer-guide/packaging.md b/assets/chezmoi.io/docs/developer-guide/packaging.md index 8e9694d2512..2eb3d6ef77f 100644 --- a/assets/chezmoi.io/docs/developer-guide/packaging.md +++ b/assets/chezmoi.io/docs/developer-guide/packaging.md @@ -31,8 +31,9 @@ optional and will be stripped, so you can pass the git tag in directly. !!! hint - The `assets/scripts/generate-commit.sh` script will return a suitable value + The `assets/scripts/generate-commit.go` script will return a suitable value for `$COMMIT`. + You can run it with `go run assets/scripts/generate-commit.go`. !!! hint diff --git a/assets/scripts/generate-commit.go b/assets/scripts/generate-commit.go new file mode 100644 index 00000000000..79f1d5bcaed --- /dev/null +++ b/assets/scripts/generate-commit.go @@ -0,0 +1,38 @@ +package main + +import ( + "bytes" + "flag" + "fmt" + "log" + "os" + "os/exec" + "strings" +) + +func main() { + output := flag.String("o", "", "output file") + flag.Parse() + + b := strings.Builder{} + sha, err := exec.Command("git", "rev-parse", "HEAD").Output() + if err != nil { + log.Fatal(err) + } + b.Write(bytes.TrimSpace(sha)) + + if err := exec.Command("git", "diff-index", "--quiet", "HEAD").Run(); err != nil { + b.WriteString("-dirty") + } + + commit := b.String() + + if *output != "" { + err := os.WriteFile(*output, []byte(commit), 0o644) + if err != nil { + log.Fatal(err) + } + } else { + fmt.Println(commit) + } +} diff --git a/assets/scripts/generate-commit.sh b/assets/scripts/generate-commit.sh deleted file mode 100755 index 5970144e39b..00000000000 --- a/assets/scripts/generate-commit.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -output="" -while getopts "o:" arg; do - case "${arg}" in - o) output="${OPTARG}" ;; - *) exit 1 ;; - esac -done - -commit="$(git rev-parse HEAD)" -if ! git diff-index --quiet HEAD; then - commit="${commit}-dirty" -fi - -if [ -z "${output}" ]; then - echo "${commit}" -else - echo "${commit}" >"${output}" -fi
chore
switch to Go for generate-commit
09386fc4eff1ddbc7408ffd18d99234ae215ded6
2023-12-13 06:04:14
Tom Payne
chore: Format code
false
diff --git a/internal/cmd/mackupcmd_darwin.go b/internal/cmd/mackupcmd_darwin.go index d875a3f8290..346e9cfb843 100644 --- a/internal/cmd/mackupcmd_darwin.go +++ b/internal/cmd/mackupcmd_darwin.go @@ -141,13 +141,22 @@ func (c *Config) mackupApplicationsDir() (chezmoi.AbsPath, error) { if !dirEntry.IsDir() || !strings.HasPrefix(dirEntry.Name(), "python") { continue } - mackupApplicationsDirAbsPath := libDirAbsPath.JoinString(dirEntry.Name(), "site-packages", "mackup", "applications") - if fileInfo, err := c.baseSystem.Stat(mackupApplicationsDirAbsPath); err == nil && fileInfo.IsDir() { + mackupApplicationsDirAbsPath := libDirAbsPath.JoinString( + dirEntry.Name(), + "site-packages", + "mackup", + "applications", + ) + if fileInfo, err := c.baseSystem.Stat(mackupApplicationsDirAbsPath); err == nil && + fileInfo.IsDir() { return mackupApplicationsDirAbsPath, nil } } - return chezmoi.EmptyAbsPath, fmt.Errorf("%s: mackup application directory not found", libDirAbsPath) + return chezmoi.EmptyAbsPath, fmt.Errorf( + "%s: mackup application directory not found", + libDirAbsPath, + ) } func parseMackupApplication(data []byte) (mackupApplicationConfig, error) {
chore
Format code
cafac9665a68829ccdf7027c3a409f25acf4c47e
2022-10-14 04:18:08
Tom Payne
chore: Fix type in comments
false
diff --git a/pkg/chezmoi/targetstateentry.go b/pkg/chezmoi/targetstateentry.go index bcf38500e01..901a7e99c39 100644 --- a/pkg/chezmoi/targetstateentry.go +++ b/pkg/chezmoi/targetstateentry.go @@ -107,7 +107,7 @@ func (t *TargetStateModifyDirWithCmd) Evaluate() error { return nil } -// SkipApply implements TargetState.SkipApply. +// SkipApply implements TargetStateEntry.SkipApply. func (t *TargetStateModifyDirWithCmd) SkipApply(persistentState PersistentState, targetAbsPath AbsPath) (bool, error) { if t.forceRefresh { return false, nil @@ -237,7 +237,7 @@ func (t *TargetStateFile) Perm(umask fs.FileMode) fs.FileMode { return t.perm &^ umask } -// SkipApply implements TargetState.SkipApply. +// SkipApply implements TargetStateEntry.SkipApply. func (t *TargetStateFile) SkipApply(persistentState PersistentState, targetAbsPath AbsPath) (bool, error) { return false, nil } @@ -264,7 +264,7 @@ func (t *TargetStateRemove) Evaluate() error { return nil } -// SkipApply implements TargetState.SkipApply. +// SkipApply implements TargetStateEntry.SkipApply. func (t *TargetStateRemove) SkipApply(persistentState PersistentState, targetAbsPath AbsPath) (bool, error) { return false, nil } @@ -334,7 +334,7 @@ func (t *TargetStateScript) Evaluate() error { return err } -// SkipApply implements TargetState.SkipApply. +// SkipApply implements TargetStateEntry.SkipApply. func (t *TargetStateScript) SkipApply(persistentState PersistentState, targetAbsPath AbsPath) (bool, error) { switch t.condition { case ScriptConditionAlways: @@ -434,7 +434,7 @@ func (t *TargetStateSymlink) Evaluate() error { return err } -// SkipApply implements TargetState.SkipApply. +// SkipApply implements TargetStateEntry.SkipApply. func (t *TargetStateSymlink) SkipApply( persistentState PersistentState, targetAbsPath AbsPath, ) (bool, error) {
chore
Fix type in comments
f7aa0140b4b7896be80c67428788c8400e9e378b
2023-05-17 04:22:29
Tom Payne
docs: Add links to blogs
false
diff --git a/assets/chezmoi.io/docs/links/links.yaml b/assets/chezmoi.io/docs/links/links.yaml index 24636fc08ad..ad11593adbf 100644 --- a/assets/chezmoi.io/docs/links/links.yaml +++ b/assets/chezmoi.io/docs/links/links.yaml @@ -407,6 +407,16 @@ articles: version: 2.32.0 title: 'Automating the Setup of a New Mac With All Your Apps, Preferences, and Development Tools' url: https://www.moncefbelyamani.com/automating-the-setup-of-a-new-mac-with-all-your-apps-preferences-and-development-tools/ +- date: '2023-03-25' + version: 2.33.0 + title: 'chezmoi, 세상 편리하게 dotfile 관리하기' + lang: KR + url: 'https://songkg7.github.io/posts/chezmoi-awesome-dotfile-manager/' +- date: '2023-04-08' + version: 2.33.1 + title: 'chezmoi, 본격적으로 활용하기' + lang: KR + url: 'https://songkg7.github.io/posts/chezmoi-basic-settings/' - date: '2023-04-15' version: 2.33.1 title: 'dotfiles の管理に chezmoi を導入して fswatch で自動 apply できるようにしたg' @@ -421,3 +431,8 @@ articles: title: 'chezmoi のテンプレート機能を使ってシェルの起動を高速化する' lang: JP url: https://blog.mono0x.net/2023/04/29/optimize-rcfiles-using-chezmoi/ +- date: '2023-05-16' + version: 2.33.6 + title: 'chezmoi' + lang: JP + url: 'https://www.ebiyuu.com/dotfiles/chezmoi/'
docs
Add links to blogs
8910adb49930d0e3f6cc8eac2826bcd3f22ef095
2022-03-26 02:42:25
Tom Payne
fix: Fix parsing of multiline KeepassXC attributes
false
diff --git a/pkg/cmd/keepassxctemplatefuncs.go b/pkg/cmd/keepassxctemplatefuncs.go index dff420bc80f..beec38f211d 100644 --- a/pkg/cmd/keepassxctemplatefuncs.go +++ b/pkg/cmd/keepassxctemplatefuncs.go @@ -30,7 +30,7 @@ type keepassxcConfig struct { } var ( - keepassxcPairRx = regexp.MustCompile(`^([^:]+):\s*(.*)$`) + keepassxcPairRx = regexp.MustCompile(`^([A-Z]\w*):\s*(.*)$`) keepassxcNeedShowProtectedArgVersion = semver.Version{Major: 2, Minor: 5, Patch: 1} ) @@ -71,7 +71,7 @@ func (c *Config) keepassxcTemplateFunc(entry string) map[string]string { panic(err) } - data, err := keypassxcParseOutput(output) + data, err := keepassxcParseOutput(output) if err != nil { panic(newParseCmdOutputError(c.Keepassxc.Command, args, output, err)) } @@ -139,18 +139,18 @@ func (c *Config) keepassxcOutput(name string, args []string) ([]byte, error) { return output, nil } -func keypassxcParseOutput(output []byte) (map[string]string, error) { +func keepassxcParseOutput(output []byte) (map[string]string, error) { data := make(map[string]string) s := bufio.NewScanner(bytes.NewReader(output)) + var key string for i := 0; s.Scan(); i++ { - if i == 0 { - continue + switch match := keepassxcPairRx.FindStringSubmatch(s.Text()); { + case match != nil: + key = match[1] + data[key] = match[2] + case match == nil && key != "": + data[key] += "\n" + s.Text() } - match := keepassxcPairRx.FindStringSubmatch(s.Text()) - if match == nil { - return nil, fmt.Errorf("%s: parse error", s.Text()) - } - data[match[1]] = match[2] } if err := s.Err(); err != nil { return nil, err diff --git a/pkg/cmd/keepassxctemplatefuncs_test.go b/pkg/cmd/keepassxctemplatefuncs_test.go new file mode 100644 index 00000000000..dd7b4222c91 --- /dev/null +++ b/pkg/cmd/keepassxctemplatefuncs_test.go @@ -0,0 +1,50 @@ +package cmd + +import ( + "strconv" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/twpayne/chezmoi/v2/pkg/chezmoitest" +) + +func TestKeepassxcParseOutput(t *testing.T) { + for i, tc := range []struct { + output []byte + expected map[string]string + }{ + { + expected: map[string]string{}, + }, + { + output: []byte(chezmoitest.JoinLines( + "Title: test", + "UserName: test", + "Password: test", + "URL:", + "Notes: account: 123456789", + "2021-11-27 [expires: 2023-02-25]", + "main = false", + )), + expected: map[string]string{ + "Title": "test", + "UserName": "test", + "Password": "test", + "URL": "", + "Notes": strings.Join([]string{ + "account: 123456789", + "2021-11-27 [expires: 2023-02-25]", + "main = false", + }, "\n"), + }, + }, + } { + t.Run(strconv.Itoa(i), func(t *testing.T) { + actual, err := keepassxcParseOutput(tc.output) + assert.NoError(t, err) + assert.Equal(t, tc.expected, actual) + }) + } +}
fix
Fix parsing of multiline KeepassXC attributes
fc4ddb63b2bd64f7c0f5d33c375d7f3a8d52ccb2
2024-11-30 06:00:12
Tom Payne
chore: Update GitHub Actions
false
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0d2b6923615..bec0382d416 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -329,7 +329,7 @@ jobs: with: cache-prefix: website-go go-version: ${{ env.GO_VERSION }} - - uses: astral-sh/setup-uv@d8db0a86d3d88f3017a4e6b8a1e2b234e7a0a1b5 + - uses: astral-sh/setup-uv@5f42d5af6c403a722299fda36d451c39f302a433 with: enable-cache: true version: ${{ env.UV_VERSION }} @@ -512,7 +512,7 @@ jobs: with: cache-prefix: website-go go-version: ${{ env.GO_VERSION }} - - uses: astral-sh/setup-uv@d8db0a86d3d88f3017a4e6b8a1e2b234e7a0a1b5 + - uses: astral-sh/setup-uv@5f42d5af6c403a722299fda36d451c39f302a433 with: enable-cache: true version: ${{ env.UV_VERSION }}
chore
Update GitHub Actions
5142cbd4508e98d553912b3ca49b944bebde74c5
2024-05-01 14:01:20
dependabot[bot]
chore(deps): bump github.com/alecthomas/assert/v2 in the go-prod group
false
diff --git a/go.mod b/go.mod index e8ef5bf8d61..e3623c22c6a 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/Masterminds/sprig/v3 v3.2.3 github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 github.com/Shopify/ejson v1.5.0 - github.com/alecthomas/assert/v2 v2.8.1 + github.com/alecthomas/assert/v2 v2.9.0 github.com/aws/aws-sdk-go-v2 v1.26.1 github.com/aws/aws-sdk-go-v2/config v1.27.11 github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.28.6 diff --git a/go.sum b/go.sum index 04810dbaa6c..9578c66b507 100644 --- a/go.sum +++ b/go.sum @@ -1,23 +1,7 @@ -cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y= -cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/firestore v1.14.0 h1:8aLcKnMPoldYU3YHgu4t2exrKhLQkqaXAGqT0ljrFVw= -cloud.google.com/go/firestore v1.14.0/go.mod h1:96MVaHLsEhbvkBEdZgfN+AS/GIkco1LRpH9Xp9YZfzQ= -cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= -cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= -cloud.google.com/go/longrunning v0.5.4 h1:w8xEcbZodnA2BbW6sVirkkoC+1gP8wS57EUUgGS0GVg= -cloud.google.com/go/longrunning v0.5.4/go.mod h1:zqNVncI0BOP8ST6XQD1+VcvuShMmq7+xFSzOL++V0dI= -cloud.google.com/go/storage v1.35.1 h1:B59ahL//eDfx2IIKFBeT5Atm9wnNmj3+8xG/W4WB//w= -cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= filippo.io/age v1.1.1 h1:pIpO7l151hCnQ4BdyBujnGP2YlUo0uj6sAVNHGBvXHg= filippo.io/age v1.1.1/go.mod h1:l03SrzDUrBkdBx8+IILdnn2KZysqQdbEBUQ4p3sqEQE= -filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= -filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 h1:E+OJmp2tPvt1W+amx48v1eqbjDYsgN+RzP4q16yV5eM= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1/go.mod h1:a6xsAQUZg+VsS3TJ05SRp524Hs4pZ/AeFSr5ENf0Yjo= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 h1:FDif4R1+UUR+00q6wquyX90K7A8dN+R5E8GEadoP7sU= @@ -46,10 +30,8 @@ github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0k github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/Shopify/ejson v1.5.0 h1:SDV5HmQlpn3hSUiw9HV0nOj9tpzup5i0OV71ioLYkpw= github.com/Shopify/ejson v1.5.0/go.mod h1:a4+JLWuTe9+tTofPBGWZoqzf0af6eQKGmFqbxoMSARc= -github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8= -github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= -github.com/alecthomas/assert/v2 v2.8.1 h1:YCxnYR6jjpfnEK5AK5SysALKdUEBPGH4Y7As6tBnDw0= -github.com/alecthomas/assert/v2 v2.8.1/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= +github.com/alecthomas/assert/v2 v2.9.0 h1:ZcLG8ccMEtlMLkLW4gwGpBWBb0N8MUCmsy1lYBVd1xQ= +github.com/alecthomas/assert/v2 v2.9.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= github.com/alecthomas/chroma/v2 v2.13.0 h1:VP72+99Fb2zEcYM0MeaWJmV+xQvz5v5cxRHd+ooU1lI= github.com/alecthomas/chroma/v2 v2.13.0/go.mod h1:BUGjjsD+ndS6eX37YgTchSEG+Jg9Jv1GiZs9sqPqztk= github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= @@ -58,8 +40,6 @@ github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4u github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= @@ -102,7 +82,6 @@ github.com/bradenhilton/cityhash v1.0.0 h1:1QauDCwfxwIGwO2jBTJdEBqXgfCusAgQOSgdl github.com/bradenhilton/cityhash v1.0.0/go.mod h1:Wmb8yW1egA9ulrsRX4mxfYx5zq4nBWOCZ+j63oK6uz8= github.com/bradenhilton/mozillainstallhash v1.0.1 h1:JVAVsItiWlLoudJX4L+tIuml+hoxjlzCwkhlENi9yS4= github.com/bradenhilton/mozillainstallhash v1.0.1/go.mod h1:J6cA36kUZrgaTkDl2bHRqI+4i2UKO1ImDB1P1x1PyOA= -github.com/bwesterb/go-ristretto v1.2.3 h1:1w53tCkGhCQ5djbat3+MH0BAQ5Kfgbt56UZQ/JMzngw= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/charmbracelet/bubbles v0.18.0 h1:PYv1A036luoBGroX6VWjQIE9Syf2Wby2oOl/39KLfy0= github.com/charmbracelet/bubbles v0.18.0/go.mod h1:08qhZhtIwzgrtBjAcJnij1t1H0ZRjwHyGsy6AL11PSw= @@ -121,12 +100,8 @@ github.com/containerd/console v1.0.4 h1:F2g4+oChYvBTsASRTz8NP6iIAi97J3TtSAsLbIFn github.com/containerd/console v1.0.4/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= -github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.21 h1:1/QdRyBaHHJP61QkWMXlOIBfsgdDeeKfK8SYVUWJKf0= -github.com/creack/pty v1.1.21/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/creack/pty/v2 v2.0.0-20231209135443-03db72c7b76c h1:5l8y/PgjeX1aUyZxXabtAf2ahCYQaqWzlFzQgU16o0U= github.com/creack/pty/v2 v2.0.0-20231209135443-03db72c7b76c/go.mod h1:1gZ4PfMDNcYx8FxDdnF/6HYP327cTeB/ru6UdoWVQvw= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= @@ -141,16 +116,12 @@ github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxK github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dustin/gojson v0.0.0-20160307161227-2e71ec9dd5ad h1:Qk76DOWdOp+GlyDKBAG3Klr9cn7N+LcYc82AZ2S7+cA= github.com/dustin/gojson v0.0.0-20160307161227-2e71ec9dd5ad/go.mod h1:mPKfmRa823oBIgl2r20LeMSpTAteW5j7FLkc0vjmzyQ= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= -github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= github.com/fatih/semgroup v1.2.0 h1:h/OLXwEM+3NNyAdZEpMiH1OzfplU09i2qXPVThGZvyg= github.com/fatih/semgroup v1.2.0/go.mod h1:1KAD4iIYfXjE4U13B48VM4z9QUwV5Tt8O4rS879kgm8= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= @@ -172,16 +143,12 @@ github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXY github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -193,17 +160,9 @@ github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg= github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4= -github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= -github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= -github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720 h1:zC34cGQu69FG7qzJ3WiKW244WfhDC3xxYMeNOX2gtUQ= -github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g= github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8= @@ -212,22 +171,8 @@ github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJr github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg= github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= -github.com/hashicorp/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= -github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= -github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= -github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= @@ -244,24 +189,16 @@ github.com/itchyny/timefmt-go v0.1.5 h1:G0INE2la8S6ru/ZI5JecgyzbbJNs5lG1RcBqa7Jm github.com/itchyny/timefmt-go v0.1.5/go.mod h1:nEP7L+2YmAbT2kZ2HfSs1d8Xtw9LY8D2stDBckWakZ8= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= -github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -270,8 +207,6 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= -github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb h1:w1g9wNDIE/pHSTmAaUhv4TZQuPBS6GV3mMz5hkgziIU= -github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -291,23 +226,11 @@ github.com/microcosm-cc/bluemonday v1.0.25/go.mod h1:ZIOjCQp1OrzBBPIJmfX4qDYFuhU github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mmcloughlin/avo v0.5.0 h1:nAco9/aI9Lg2kiuROBY6BhCI/z0t5jEvJfjWbL8qXLU= -github.com/mmcloughlin/avo v0.5.0/go.mod h1:ChHFdoV7ql95Wi7vuq2YT1bwCJqiWdZrQ1im3VujLYM= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5 h1:8Q0qkMVC/MmWkpIdlvZgcv2o2jrlF6zqVOh7W5YHdMA= -github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= -github.com/montanaflynn/stats v0.7.0 h1:r3y12KyNxj/Sb/iOE46ws+3mS1+MZca1wlHQFPsY/JU= -github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= @@ -318,18 +241,10 @@ github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= -github.com/nats-io/nats.go v1.31.0 h1:/WFBHEc/dOKBF6qf1TZhrdEfTmOZ5JzdJ+Y3m6Y/p7E= -github.com/nats-io/nats.go v1.31.0/go.mod h1:di3Bm5MLsoB4Bx61CBTsxuarI36WbhAwOm8QrW39+i8= -github.com/nats-io/nkeys v0.4.6 h1:IzVe95ru2CT6ta874rt9saQRkWfe2nFj1NtvYSLqMzY= -github.com/nats-io/nkeys v0.4.6/go.mod h1:4DxZNzenSVd1cYQoAa8948QY3QDjrHfcfVADymtkpts= -github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= -github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ= -github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.2.1 h1:9TA9+T8+8CUCO2+WYnDLCgrYi9+omqKXyjDtosvtEhg= github.com/pelletier/go-toml/v2 v2.2.1/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= @@ -338,12 +253,8 @@ github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.6 h1:JFZT4XbOU7l77xGSpOdW+pwIMqP044IyjXX6FGyEKFo= -github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -353,28 +264,20 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sagikazarmark/crypt v0.17.0 h1:ZA/7pXyjkHoK4bW4mIdnCLvL8hd+Nrbiw7Dqk7D4qUk= -github.com/sagikazarmark/crypt v0.17.0/go.mod h1:SMtHTvdmsZMuY/bpZoqokSoChIrcJ/epOxZN58PbZDg= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= -github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f h1:MvTmaQdww/z0Q4wrYjDSCcZ78NoftLQyHBSLW/Cx79Y= -github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A= github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/smarty/assertions v1.15.0 h1:cR//PqUBUiQRakZWqBiFFQ9wb8emQGDb0HeGdqGByCY= @@ -390,8 +293,6 @@ github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= @@ -426,8 +327,6 @@ github.com/twpayne/go-xdg/v6 v6.1.3 h1:viM0S9v4KAc0IRW2xI3Zp8ZkqOCoCxmCmVZ7GTnG0 github.com/twpayne/go-xdg/v6 v6.1.3/go.mod h1:kVT9oShzQ0Cb5r4gzwziZUfluW2sTR72slQC/4N1AXI= github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc= github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk= -github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/yuin/goldmark v1.3.7/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= @@ -442,24 +341,8 @@ github.com/zricethezav/gitleaks/v8 v8.18.2 h1:slo/sMmgs3qA+6Vv6iqVhsCv+gsl3RekQX github.com/zricethezav/gitleaks/v8 v8.18.2/go.mod h1:8F5GrdCpEtyN5R+0MKPubbOPqIHptNckH3F7bYrhT+Y= go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= -go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= -go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= -go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= -go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= -go.etcd.io/etcd/client/v2 v2.305.10 h1:MrmRktzv/XF8CvtQt+P6wLUlURaNpSDJHFZhe//2QE4= -go.etcd.io/etcd/client/v2 v2.305.10/go.mod h1:m3CKZi69HzilhVqtPDcjhSGp+kA1OmbNn0qamH80xjA= -go.etcd.io/etcd/client/v3 v3.5.10 h1:W9TXNZ+oB3MCd/8UjxHTWK5J9Nquw9fQBLJd5ne5/Ao= -go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc= -go.etcd.io/gofail v0.1.0 h1:XItAMIhOojXFQMgrxjnd2EIIHun/d5qL0Pf7FzVTkFg= -go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= -go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= @@ -472,8 +355,6 @@ golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2 golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -510,8 +391,6 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2 h1:IRJeR9r1pYWsHKTRe/IInb7lYvbBVIqOgsX/u0mbOWY= -golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= @@ -528,8 +407,6 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= @@ -538,22 +415,6 @@ golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/api v0.153.0 h1:N1AwGhielyKFaUqH07/ZSIQR3uNPcV7NVw0vj+j4iR4= -google.golang.org/api v0.153.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 h1:wpZ8pe2x1Q3f2KyT5f8oP/fa9rHAKgFPr/HZdNuS+PQ= -google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY= -google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo= -google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= @@ -562,7 +423,6 @@ gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0 h1:POO/ycCATvegFmVuPpQzZFJ+pGZeX22Ufu6fibxDVjU= gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -573,7 +433,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= howett.net/plist v1.0.1 h1:37GdZ8tP09Q35o9ych3ehygcsL+HqKSwzctveSlarvM= howett.net/plist v1.0.1/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= -mvdan.cc/editorconfig v0.2.1-0.20231228180347-1925077f8eb2 h1:8nmqQGVnHUtHuT+yvuA49lQK0y5il5IOr2PtCBkDI2M= -mvdan.cc/editorconfig v0.2.1-0.20231228180347-1925077f8eb2/go.mod h1:r8RiQJRtzrPrZdcdEs5VCMqvRxAzYDUu9a4S9z7fKh8= mvdan.cc/sh/v3 v3.8.0 h1:ZxuJipLZwr/HLbASonmXtcvvC9HXY9d2lXZHnKGjFc8= mvdan.cc/sh/v3 v3.8.0/go.mod h1:w04623xkgBVo7/IUK89E0g8hBykgEpN0vgOj3RJr6MY=
chore
bump github.com/alecthomas/assert/v2 in the go-prod group
f91dbfc2256b59c003ecdf28815a265e48eeecc3
2024-09-10 05:21:42
Tom Payne
chore: Update tools
false
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0fd8f1146b8..ae486f30fa0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ env: FIND_TYPOS_VERSION: 0.0.3 # https://github.com/twpayne/find-typos/tags GO_VERSION: 1.23.1 # https://go.dev/doc/devel/release GOFUMPT_VERSION: 0.7.0 # https://github.com/mvdan/gofumpt/releases - GOLANGCI_LINT_VERSION: 1.60.3 # https://github.com/golangci/golangci-lint/releases + GOLANGCI_LINT_VERSION: 1.61.0 # https://github.com/golangci/golangci-lint/releases GOLINES_VERSION: 0.12.2 # https://github.com/segmentio/golines/releases GORELEASER_VERSION: 2.2.0 # https://github.com/goreleaser/goreleaser/releases GOVERSIONINFO_VERSION: 1.4.1 # https://github.com/josephspurrier/goversioninfo/releases diff --git a/.golangci.yml b/.golangci.yml index 057619125fc..2fa3ebb68a6 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -31,7 +31,6 @@ linters: - goimports - gomodguard - goprintffuncname - - gosec - gosimple - gosmopolitan - govet @@ -95,6 +94,7 @@ linters: - goheader - gomnd - gomoddirectives + - gosec - ireturn - lll - maintidx @@ -154,13 +154,10 @@ issues: text: unused-parameter - linters: - forbidigo - - gosec path: ^internal/cmds/ - linters: - forcetypeassert - - gosec path: _test\.go$ - linters: - forbidigo - - gosec path: assets/scripts/generate-commit.go diff --git a/internal/chezmoi/ageencryption.go b/internal/chezmoi/ageencryption.go index 302a29e5812..5532191ac52 100644 --- a/internal/chezmoi/ageencryption.go +++ b/internal/chezmoi/ageencryption.go @@ -37,7 +37,7 @@ func (e *AgeEncryption) Decrypt(ciphertext []byte) ([]byte, error) { return e.builtinDecrypt(ciphertext) } - cmd := exec.Command(e.Command, append(e.decryptArgs(), e.Args...)...) //nolint:gosec + cmd := exec.Command(e.Command, append(e.decryptArgs(), e.Args...)...) cmd.Stdin = bytes.NewReader(ciphertext) cmd.Stderr = os.Stderr return chezmoilog.LogCmdOutput(slog.Default(), cmd) @@ -50,11 +50,11 @@ func (e *AgeEncryption) DecryptToFile(plaintextAbsPath AbsPath, ciphertext []byt if err != nil { return err } - return os.WriteFile(plaintextAbsPath.String(), plaintext, 0o644) //nolint:gosec + return os.WriteFile(plaintextAbsPath.String(), plaintext, 0o644) } args := append(append(e.decryptArgs(), "--output", plaintextAbsPath.String()), e.Args...) - cmd := exec.Command(e.Command, args...) //nolint:gosec + cmd := exec.Command(e.Command, args...) cmd.Stdin = bytes.NewReader(ciphertext) cmd.Stderr = os.Stderr return chezmoilog.LogCmdRun(slog.Default(), cmd) @@ -66,7 +66,7 @@ func (e *AgeEncryption) Encrypt(plaintext []byte) ([]byte, error) { return e.builtinEncrypt(plaintext) } - cmd := exec.Command(e.Command, append(e.encryptArgs(), e.Args...)...) //nolint:gosec + cmd := exec.Command(e.Command, append(e.encryptArgs(), e.Args...)...) cmd.Stdin = bytes.NewReader(plaintext) cmd.Stderr = os.Stderr return chezmoilog.LogCmdOutput(slog.Default(), cmd) @@ -83,7 +83,7 @@ func (e *AgeEncryption) EncryptFile(plaintextAbsPath AbsPath) ([]byte, error) { } args := append(append(e.encryptArgs(), e.Args...), plaintextAbsPath.String()) - cmd := exec.Command(e.Command, args...) //nolint:gosec + cmd := exec.Command(e.Command, args...) cmd.Stderr = os.Stderr return chezmoilog.LogCmdOutput(slog.Default(), cmd) } diff --git a/internal/chezmoi/chezmoi.go b/internal/chezmoi/chezmoi.go index 7d00270bd70..7fb2f7edaf0 100644 --- a/internal/chezmoi/chezmoi.go +++ b/internal/chezmoi/chezmoi.go @@ -4,8 +4,8 @@ package chezmoi import ( "bufio" "bytes" - "crypto/md5" //nolint:gosec - "crypto/sha1" //nolint:gosec + "crypto/md5" + "crypto/sha1" "crypto/sha256" "crypto/sha512" "fmt" @@ -20,7 +20,7 @@ import ( "github.com/spf13/cobra" vfs "github.com/twpayne/go-vfs/v5" - "golang.org/x/crypto/ripemd160" //nolint:gosec,staticcheck + "golang.org/x/crypto/ripemd160" //nolint:staticcheck "github.com/twpayne/chezmoi/v2/internal/chezmoiset" ) @@ -336,7 +336,7 @@ func isReadOnly(fileInfo fs.FileInfo) bool { // md5Sum returns the MD5 sum of data. func md5Sum(data []byte) []byte { - md5SumArr := md5.Sum(data) //nolint:gosec + md5SumArr := md5.Sum(data) return md5SumArr[:] } @@ -361,12 +361,12 @@ func modeTypeName(mode fs.FileMode) string { // ripemd160Sum returns the RIPEMD-160 sum of data. func ripemd160Sum(data []byte) []byte { - return ripemd160.New().Sum(data) //nolint:gosec + return ripemd160.New().Sum(data) } // sha1Sum returns the SHA1 sum of data. func sha1Sum(data []byte) []byte { - sha1SumArr := sha1.Sum(data) //nolint:gosec + sha1SumArr := sha1.Sum(data) return sha1SumArr[:] } diff --git a/internal/chezmoi/chezmoi_unix.go b/internal/chezmoi/chezmoi_unix.go index a7427c3c111..18c2e403734 100644 --- a/internal/chezmoi/chezmoi_unix.go +++ b/internal/chezmoi/chezmoi_unix.go @@ -12,7 +12,7 @@ import ( const nativeLineEnding = "\n" func init() { - Umask = fs.FileMode(unix.Umask(0)) //nolint:gosec + Umask = fs.FileMode(unix.Umask(0)) unix.Umask(int(Umask)) } diff --git a/internal/chezmoi/externaldiffsystem.go b/internal/chezmoi/externaldiffsystem.go index 5a3b96415e2..9e92b74f79d 100644 --- a/internal/chezmoi/externaldiffsystem.go +++ b/internal/chezmoi/externaldiffsystem.go @@ -199,7 +199,7 @@ func (s *ExternalDiffSystem) RunScript(scriptName RelPath, dir AbsPath, data []b if !s.scriptContents { toData = nil } - if err := os.WriteFile(targetAbsPath.String(), toData, 0o700); err != nil { //nolint:gosec + if err := os.WriteFile(targetAbsPath.String(), toData, 0o700); err != nil { return err } if err := s.runDiffCommand(devNullAbsPath, targetAbsPath); err != nil { @@ -325,7 +325,7 @@ func (s *ExternalDiffSystem) runDiffCommand(destAbsPath, targetAbsPath AbsPath) args = append(args, templateData.Destination, templateData.Target) } - cmd := exec.Command(s.command, args...) //nolint:gosec + cmd := exec.Command(s.command, args...) cmd.Stdin = os.Stdin cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr diff --git a/internal/chezmoi/gpgencryption.go b/internal/chezmoi/gpgencryption.go index 65c97cf45b1..2a77780456d 100644 --- a/internal/chezmoi/gpgencryption.go +++ b/internal/chezmoi/gpgencryption.go @@ -139,7 +139,7 @@ func (e *GPGEncryption) encryptArgs(plaintextAbsPath, ciphertextAbsPath AbsPath) // run runs the command with args. func (e *GPGEncryption) run(args []string) error { - cmd := exec.Command(e.Command, args...) //nolint:gosec + cmd := exec.Command(e.Command, args...) cmd.Stdin = os.Stdin cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr diff --git a/internal/chezmoi/interpreter.go b/internal/chezmoi/interpreter.go index 15036d2fdc7..d018167e8fa 100644 --- a/internal/chezmoi/interpreter.go +++ b/internal/chezmoi/interpreter.go @@ -16,7 +16,7 @@ func (i *Interpreter) ExecCommand(name string) *exec.Cmd { if i.None() { return exec.Command(name) } - return exec.Command(i.Command, append(i.Args, name)...) //nolint:gosec + return exec.Command(i.Command, append(i.Args, name)...) } // None returns if i represents no interpreter. diff --git a/internal/chezmoi/sourcestate.go b/internal/chezmoi/sourcestate.go index 0ebb1fbef78..e7bf038fb62 100644 --- a/internal/chezmoi/sourcestate.go +++ b/internal/chezmoi/sourcestate.go @@ -1714,7 +1714,7 @@ func (s *SourceState) getExternalData( } if external.Filter.Command != "" { - cmd := exec.Command(external.Filter.Command, external.Filter.Args...) //nolint:gosec + cmd := exec.Command(external.Filter.Command, external.Filter.Args...) cmd.Stdin = bytes.NewReader(data) cmd.Stderr = os.Stderr data, err = chezmoilog.LogCmdOutput(s.logger, cmd) diff --git a/internal/chezmoitest/chezmoitest.go b/internal/chezmoitest/chezmoitest.go index cd4930c0f60..09b1110b92a 100644 --- a/internal/chezmoitest/chezmoitest.go +++ b/internal/chezmoitest/chezmoitest.go @@ -25,7 +25,7 @@ var ageRecipientRx = regexp.MustCompile(`(?m)^Public key: ([0-9a-z]+)\s*$`) // AgeGenerateKey generates an identity in identityFile and returns the // recipient. func AgeGenerateKey(command, identityFile string) (string, error) { - cmd := exec.Command(command+"-keygen", "--output", identityFile) //nolint:gosec + cmd := exec.Command(command+"-keygen", "--output", identityFile) output, err := chezmoilog.LogCmdCombinedOutput(slog.Default(), cmd) if err != nil { return "", err @@ -41,7 +41,7 @@ func AgeGenerateKey(command, identityFile string) (string, error) { // passphrase. func GPGGenerateKey(command, homeDir string) (key, passphrase string, err error) { key = "chezmoi-test-gpg-key" - passphrase = "chezmoi-test-gpg-passphrase" //nolint:gosec + passphrase = "chezmoi-test-gpg-passphrase" cmd := exec.Command( command, "--batch", @@ -101,5 +101,5 @@ func mustParseFileMode(s string) fs.FileMode { if err != nil { panic(err) } - return fs.FileMode(uint32(u)) //nolint:gosec + return fs.FileMode(uint32(u)) } diff --git a/internal/cmd/config.go b/internal/cmd/config.go index d8509659c69..07d933b8dcd 100644 --- a/internal/cmd/config.go +++ b/internal/cmd/config.go @@ -733,7 +733,7 @@ func (c *Config) colorAutoFunc() bool { return false } if stdout, ok := c.stdout.(*os.File); ok { - return term.IsTerminal(int(stdout.Fd())) //nolint:gosec + return term.IsTerminal(int(stdout.Fd())) } return false } @@ -2270,7 +2270,7 @@ func (c *Config) persistentStateFile() (chezmoi.AbsPath, error) { // progressAutoFunc detects whether progress bars should be displayed. func (c *Config) progressAutoFunc() bool { if stdout, ok := c.stdout.(*os.File); ok { - return term.IsTerminal(int(stdout.Fd())) //nolint:gosec + return term.IsTerminal(int(stdout.Fd())) } return false } @@ -2720,7 +2720,7 @@ func (c *Config) writeOutput(data []byte) error { _, err := c.stdout.Write(data) return err } - return os.WriteFile(c.outputAbsPath.String(), data, 0o666) //nolint:gosec + return os.WriteFile(c.outputAbsPath.String(), data, 0o666) } type writePathsOptions struct { diff --git a/internal/cmd/doctorcmd.go b/internal/cmd/doctorcmd.go index d0f4c72c83d..b3f117f4c7d 100644 --- a/internal/cmd/doctorcmd.go +++ b/internal/cmd/doctorcmd.go @@ -492,7 +492,7 @@ func (c *binaryCheck) Run(system chezmoi.System, homeDirAbsPath chezmoi.AbsPath) return checkResultOK, fmt.Sprintf("found %s", pathAbsPath) } - cmd := exec.Command(pathAbsPath.String(), c.versionArgs...) //nolint:gosec + cmd := exec.Command(pathAbsPath.String(), c.versionArgs...) output, err := chezmoilog.LogCmdCombinedOutput(slog.Default(), cmd) if err != nil { return checkResultFailed, err.Error() @@ -583,13 +583,7 @@ func (c *dirCheck) Run(system chezmoi.System, homeDirAbsPath chezmoi.AbsPath) (c if dirEntry.Name() != ".git" { continue } - cmd := exec.Command( //nolint:gosec - "git", - "-C", - c.dirname.String(), - "status", - "--porcelain=v2", - ) + cmd := exec.Command("git", "-C", c.dirname.String(), "status", "--porcelain=v2") cmd.Stderr = os.Stderr output, err := cmd.Output() if err != nil { diff --git a/internal/cmd/dopplertemplatefuncs.go b/internal/cmd/dopplertemplatefuncs.go index 4f99436dc33..393e6269bef 100644 --- a/internal/cmd/dopplertemplatefuncs.go +++ b/internal/cmd/dopplertemplatefuncs.go @@ -83,7 +83,7 @@ func (c *Config) dopplerOutput(args []string) ([]byte, error) { if data, ok := c.Doppler.outputCache[key]; ok { return data, nil } - cmd := exec.Command(c.Doppler.Command, args...) //nolint:gosec + cmd := exec.Command(c.Doppler.Command, args...) // Always run the doppler command in the destination path because doppler uses // relative paths to find its .doppler.json config file. cmd.Dir = c.DestDirAbsPath.String() diff --git a/internal/cmd/hcpvaultsecretsttemplatefuncs.go b/internal/cmd/hcpvaultsecretsttemplatefuncs.go index 2e4e49cbe88..857a8b60687 100644 --- a/internal/cmd/hcpvaultsecretsttemplatefuncs.go +++ b/internal/cmd/hcpvaultsecretsttemplatefuncs.go @@ -90,7 +90,7 @@ func (c *Config) vltOutput(args []string) ([]byte, error) { return data, nil } - cmd := exec.Command(c.HCPVaultSecrets.Command, args...) //nolint:gosec + cmd := exec.Command(c.HCPVaultSecrets.Command, args...) // Always run the vlt command in the destination path because vlt uses // relative paths to find its .vlt.json config file. cmd.Dir = c.DestDirAbsPath.String() diff --git a/internal/cmd/inittemplatefuncs.go b/internal/cmd/inittemplatefuncs.go index 0b5fefadb07..89c45d36f92 100644 --- a/internal/cmd/inittemplatefuncs.go +++ b/internal/cmd/inittemplatefuncs.go @@ -20,7 +20,7 @@ func (c *Config) stdinIsATTYInitTemplateFunc() bool { if !ok { return false } - return term.IsTerminal(int(file.Fd())) //nolint:gosec + return term.IsTerminal(int(file.Fd())) } func (c *Config) writeToStdout(args ...string) string { diff --git a/internal/cmd/keepassxctemplatefuncs.go b/internal/cmd/keepassxctemplatefuncs.go index 87aca882faa..ce6cc3bebbf 100644 --- a/internal/cmd/keepassxctemplatefuncs.go +++ b/internal/cmd/keepassxctemplatefuncs.go @@ -167,7 +167,7 @@ func (c *Config) keepassxcOutputCachePassword(command string, args ...string) ([ cmdArgs = append(cmdArgs, c.Keepassxc.Args...) cmdArgs = append(cmdArgs, c.Keepassxc.Database.String()) cmdArgs = append(cmdArgs, args...) - cmd := exec.Command(c.Keepassxc.Command, cmdArgs...) //nolint:gosec + cmd := exec.Command(c.Keepassxc.Command, cmdArgs...) if c.Keepassxc.password == "" && c.Keepassxc.Prompt { password, err := c.readPassword(fmt.Sprintf("Enter password to unlock %s: ", c.Keepassxc.Database)) if err != nil { @@ -204,7 +204,7 @@ func (c *Config) keepassxcOutputOpen(command string, args ...string) ([]byte, er cmdArgs := []string{"open"} cmdArgs = append(cmdArgs, c.Keepassxc.Args...) cmdArgs = append(cmdArgs, c.Keepassxc.Database.String()) - cmd := exec.Command(c.Keepassxc.Command, cmdArgs...) //nolint:gosec + cmd := exec.Command(c.Keepassxc.Command, cmdArgs...) env := os.Environ() // Ensure prompt is in English. env = append(env, "LANGUAGE=en") diff --git a/internal/cmd/onepasswordtemplatefuncs.go b/internal/cmd/onepasswordtemplatefuncs.go index a7054ba644b..3fd3524ce1f 100644 --- a/internal/cmd/onepasswordtemplatefuncs.go +++ b/internal/cmd/onepasswordtemplatefuncs.go @@ -181,7 +181,7 @@ func (c *Config) onepasswordGetOrRefreshSessionToken(args *onepasswordArgs) (str commandArgs = append(commandArgs, "--session", session) } - cmd := exec.Command(c.Onepassword.Command, commandArgs...) //nolint:gosec + cmd := exec.Command(c.Onepassword.Command, commandArgs...) cmd.Stdin = os.Stdin cmd.Stderr = os.Stderr output, err := chezmoilog.LogCmdOutput(c.logger, cmd) @@ -235,7 +235,7 @@ func (c *Config) onepasswordOutput(args *onepasswordArgs, withSessionToken withS } } - cmd := exec.Command(c.Onepassword.Command, commandArgs...) //nolint:gosec + cmd := exec.Command(c.Onepassword.Command, commandArgs...) cmd.Stdin = os.Stdin cmd.Stderr = os.Stderr output, err := chezmoilog.LogCmdOutput(c.logger, cmd) diff --git a/internal/cmd/passtemplatefuncs.go b/internal/cmd/passtemplatefuncs.go index e34bec8ded1..1d5206476cf 100644 --- a/internal/cmd/passtemplatefuncs.go +++ b/internal/cmd/passtemplatefuncs.go @@ -51,7 +51,7 @@ func (c *Config) passOutput(id string) ([]byte, error) { } args := []string{"show", id} - cmd := exec.Command(c.Pass.Command, args...) //nolint:gosec + cmd := exec.Command(c.Pass.Command, args...) cmd.Stdin = os.Stdin cmd.Stderr = os.Stderr output, err := chezmoilog.LogCmdOutput(c.logger, cmd) diff --git a/internal/cmd/rbwtemplatefuncs.go b/internal/cmd/rbwtemplatefuncs.go index 8434be7163c..399235cedf0 100644 --- a/internal/cmd/rbwtemplatefuncs.go +++ b/internal/cmd/rbwtemplatefuncs.go @@ -58,7 +58,7 @@ func (c *Config) rbwOutput(args []string) ([]byte, error) { return data, nil } - cmd := exec.Command(c.RBW.Command, args...) //nolint:gosec + cmd := exec.Command(c.RBW.Command, args...) cmd.Stdin = os.Stdin cmd.Stderr = os.Stderr output, err := chezmoilog.LogCmdOutput(c.logger, cmd) diff --git a/internal/cmd/secrettemplatefuncs.go b/internal/cmd/secrettemplatefuncs.go index b1dc4a3cf6e..a68787c0f09 100644 --- a/internal/cmd/secrettemplatefuncs.go +++ b/internal/cmd/secrettemplatefuncs.go @@ -45,7 +45,7 @@ func (c *Config) secretOutput(args []string) ([]byte, error) { } args = append(slices.Clone(c.Secret.Args), args...) - cmd := exec.Command(c.Secret.Command, args...) //nolint:gosec + cmd := exec.Command(c.Secret.Command, args...) cmd.Stdin = os.Stdin cmd.Stderr = os.Stderr output, err := chezmoilog.LogCmdOutput(c.logger, cmd) diff --git a/internal/cmd/textconv.go b/internal/cmd/textconv.go index d4d799507ca..2d1a102fe05 100644 --- a/internal/cmd/textconv.go +++ b/internal/cmd/textconv.go @@ -37,7 +37,7 @@ func (t textConv) convert(path string, data []byte) ([]byte, error) { return data, nil } - cmd := exec.Command(longestPatternElement.Command, longestPatternElement.Args...) //nolint:gosec + cmd := exec.Command(longestPatternElement.Command, longestPatternElement.Args...) cmd.Stdin = bytes.NewReader(data) cmd.Stderr = os.Stderr return chezmoilog.LogCmdOutput(slog.Default(), cmd) diff --git a/internal/cmd/vaulttemplatefuncs.go b/internal/cmd/vaulttemplatefuncs.go index f298be0688f..1bb7a3077f3 100644 --- a/internal/cmd/vaulttemplatefuncs.go +++ b/internal/cmd/vaulttemplatefuncs.go @@ -19,7 +19,7 @@ func (c *Config) vaultTemplateFunc(key string) any { } args := []string{"kv", "get", "-format=json", key} - cmd := exec.Command(c.Vault.Command, args...) //nolint:gosec + cmd := exec.Command(c.Vault.Command, args...) cmd.Stdin = os.Stdin cmd.Stderr = os.Stderr output, err := chezmoilog.LogCmdOutput(c.logger, cmd)
chore
Update tools
17a0455bf53bc086fa6088590095a7788418e648
2021-10-20 03:09:51
Tom Payne
chore: Update dependencies
false
diff --git a/go.mod b/go.mod index 22b37aacaf2..3de04ac5b3b 100644 --- a/go.mod +++ b/go.mod @@ -6,22 +6,20 @@ require ( filippo.io/age v1.0.0 github.com/Masterminds/sprig/v3 v3.2.2 github.com/ProtonMail/go-crypto v0.0.0-20210920160938-87db9fbc61c7 // indirect - github.com/alecthomas/chroma v0.9.2 // indirect - github.com/alecthomas/colour v0.1.0 // indirect - github.com/alecthomas/repr v0.0.0-20201120212035-bb82daffcca2 // indirect + github.com/alecthomas/chroma v0.9.4 // indirect github.com/bmatcuk/doublestar/v4 v4.0.2 github.com/bradenhilton/mozillainstallhash v1.0.0 github.com/charmbracelet/glamour v0.3.0 github.com/coreos/go-semver v0.3.0 github.com/danieljoos/wincred v1.1.2 // indirect github.com/go-git/go-git/v5 v5.4.2 - github.com/google/go-github/v39 v39.1.0 - github.com/google/gops v0.3.20 + github.com/google/go-github/v39 v39.2.0 + github.com/google/gops v0.3.21 github.com/google/renameio/v2 v2.0.0 github.com/google/uuid v1.3.0 // indirect github.com/huandu/xstrings v1.3.2 // indirect github.com/kevinburke/ssh_config v1.1.0 // indirect - github.com/microcosm-cc/bluemonday v1.0.15 // indirect + github.com/microcosm-cc/bluemonday v1.0.16 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.4.2 github.com/muesli/combinator v0.3.0 @@ -44,9 +42,9 @@ require ( go.etcd.io/bbolt v1.3.6 go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.7.0 - golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6 // indirect - golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f - golang.org/x/sys v0.0.0-20211001092434-39dca1131b70 + golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect + golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 + golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b @@ -54,8 +52,10 @@ require ( ) require ( + github.com/Microsoft/go-winio v0.5.1 // indirect github.com/godbus/dbus/v5 v5.0.5 // indirect github.com/mattn/go-isatty v0.0.14 // indirect + github.com/shopspring/decimal v1.3.0 // indirect github.com/stretchr/objx v0.3.0 // indirect golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect golang.org/x/text v0.3.7 // indirect diff --git a/go.sum b/go.sum index 5f4e3d8481c..b446bb0d1c8 100644 --- a/go.sum +++ b/go.sum @@ -56,8 +56,9 @@ github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmy github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY= +github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= github.com/ProtonMail/go-crypto v0.0.0-20210920160938-87db9fbc61c7 h1:DSqTh6nEes/uO8BlNcGk8PzZsxY2sN9ZL//veWBdTRI= @@ -65,18 +66,13 @@ github.com/ProtonMail/go-crypto v0.0.0-20210920160938-87db9fbc61c7/go.mod h1:z4/ github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= -github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= github.com/alecthomas/chroma v0.8.2/go.mod h1:sko8vR34/90zvl5QdcUdvzL3J8NKjAUx9va9jPuFNoM= -github.com/alecthomas/chroma v0.9.2 h1:yU1sE2+TZbLIQPMk30SolL2Hn53SR/Pv750f7qZ/XMs= -github.com/alecthomas/chroma v0.9.2/go.mod h1:eMuEnpA18XbG/WhOWtCzJHS7WqEtDAI+HxdwoW0nVSk= +github.com/alecthomas/chroma v0.9.4 h1:YL7sOAE3p8HS96T9km7RgvmsZIctqbK1qJ0b7hzed44= +github.com/alecthomas/chroma v0.9.4/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= -github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= github.com/alecthomas/kong v0.2.4/go.mod h1:kQOmtJgV+Lb4aj+I2LEn40cbtawdWJ9Y8QLq+lElKxE= github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= -github.com/alecthomas/repr v0.0.0-20201120212035-bb82daffcca2 h1:G5TeG64Ox4OWq2YwlsxS7nOedU8vbGgNRTRDAjGvDCk= -github.com/alecthomas/repr v0.0.0-20201120212035-bb82daffcca2/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= @@ -86,7 +82,6 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= @@ -117,7 +112,6 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= -github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -157,6 +151,7 @@ github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.2.6-0.20210915003542-8b1f7f90f6b1/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.5 h1:9Eg0XUhQxtkV8ykTMKtMMYY72g4NgxtRq4jgh4Ih5YM= @@ -209,13 +204,13 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-github/v39 v39.1.0 h1:1vf4gM0D1e+Df2HMxaYC3+o9+Huj3ywGTtWc3VVYaDA= -github.com/google/go-github/v39 v39.1.0/go.mod h1:C1s8C5aCC9L+JXIYpJM5GYytdX52vC1bLvHEF1IhBrE= +github.com/google/go-github/v39 v39.2.0 h1:rNNM311XtPOz5rDdsJXAp2o8F67X9FnROXTvto3aSnQ= +github.com/google/go-github/v39 v39.2.0/go.mod h1:C1s8C5aCC9L+JXIYpJM5GYytdX52vC1bLvHEF1IhBrE= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gops v0.3.20 h1:97S0xmsN8IGNZb01WzTs6uJ2Dk498kewm8DPms1ZDc8= -github.com/google/gops v0.3.20/go.mod h1:72rOEikXBgqInvem1+moV6aKbrxZstbrzWBuL/JOWC4= +github.com/google/gops v0.3.21 h1:SmULDdFdSLaPZHR3FgPJfNFfrrohoHUgC9DenFuGrUE= +github.com/google/gops v0.3.21/go.mod h1:7diIdLsqpCihPSX3fQagksT/Ku/y4RL9LHTlKyEUDl8= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -335,8 +330,8 @@ github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRC github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/microcosm-cc/bluemonday v1.0.6/go.mod h1:HOT/6NaBlR0f9XlxD3zolN6Z3N8Lp4pvhp+jLS5ihnI= -github.com/microcosm-cc/bluemonday v1.0.15 h1:J4uN+qPng9rvkBZBoBb8YGR+ijuklIMpSOZZLjYpbeY= -github.com/microcosm-cc/bluemonday v1.0.15/go.mod h1:ZLvAzeakRwrGnzQEvstVzVt3ZpqOF2+sdFr0Om+ce30= +github.com/microcosm-cc/bluemonday v1.0.16 h1:kHmAq2t7WPWLjiGvzKa5o3HzSfahUKiOq7fAPUiMNIc= +github.com/microcosm-cc/bluemonday v1.0.16/go.mod h1:Z0r70sCuXHig8YpBzCc5eGHAap2K7e/u082ZUpDRRqM= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -404,9 +399,10 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shirou/gopsutil/v3 v3.21.8/go.mod h1:YWp/H8Qs5fVmf17v7JNZzA0mPJ+mS2e9JdiUF9LlKzQ= -github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= +github.com/shirou/gopsutil/v3 v3.21.9/go.mod h1:YWp/H8Qs5fVmf17v7JNZzA0mPJ+mS2e9JdiUF9LlKzQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shopspring/decimal v1.3.0 h1:KK3gWIXskZ2O1U/JNTisNcvH+jveJxZYrjbTsrbbnh8= +github.com/shopspring/decimal v1.3.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= @@ -578,8 +574,8 @@ golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6 h1:Z04ewVs7JhXaYkmDhBERPi41gnltfQpMWDnTnQbaCqk= -golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -595,8 +591,9 @@ golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 h1:B333XXssMuKQeBwiNODx4TupZy7bf4sxFZnN2ZOcvUE= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -676,8 +673,8 @@ golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210902050250-f475640dd07b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211001092434-39dca1131b70 h1:pGleJoyD1yA5HfvuaksHxD0404gsEkNDerKsQ0N0y1s= -golang.org/x/sys v0.0.0-20211001092434-39dca1131b70/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
chore
Update dependencies
86ec4b81cffffa59ab86fce05e2ec6d49386410b
2022-01-26 01:39:23
Tom Payne
feat: Add remove_ attribute for directories
false
diff --git a/assets/chezmoi.io/docs/reference/commands/chattr.md b/assets/chezmoi.io/docs/reference/commands/chattr.md index 3714de27f5e..4370db09183 100644 --- a/assets/chezmoi.io/docs/reference/commands/chattr.md +++ b/assets/chezmoi.io/docs/reference/commands/chattr.md @@ -19,6 +19,7 @@ modifiers and their abbreviations are: | `once` | `o` | | `private` | `p` | | `readonly` | `r` | +| `remove` | *none* | | `template` | `t` | The type of a target can be changed using a type modifier: diff --git a/assets/chezmoi.io/docs/reference/source-state-attributes.md b/assets/chezmoi.io/docs/reference/source-state-attributes.md index 7ad1d6363e7..ecaf19177cd 100644 --- a/assets/chezmoi.io/docs/reference/source-state-attributes.md +++ b/assets/chezmoi.io/docs/reference/source-state-attributes.md @@ -27,7 +27,7 @@ to as "attributes": | `onchange_` | Only run the script if its contents have changed from the last time it was run | | `private_` | Remove all group and world permissions from the target file or directory | | `readonly_` | Remove all write permissions from the target file or directory | -| `remove_` | Remove the entry if it exists | +| `remove_` | Remove the file or symlink if it exists or the directory if it is empty | | `run_` | Treat the contents as a script to run | | `symlink_` | Create a symlink instead of a regular file | @@ -41,7 +41,7 @@ prefixes is important. | Target type | Source type | Allowed prefixes in order | Allowed suffixes | | ------------- | ----------- | ----------------------------------------------------------------------- | ---------------- | -| Directory | Directory | `exact_`, `private_`, `readonly_`, `dot_` | *none* | +| Directory | Directory | `remove_`, `exact_`, `private_`, `readonly_`, `dot_` | *none* | | Regular file | File | `encrypted_`, `private_`, `executable_`, `dot_` | `.tmpl` | | Create file | File | `create_`, `encrypted_`, `private_`, `readonly_`, `executable_`, `dot_` | `.tmpl` | | Modify file | File | `modify_`, `encrypted_`, `private_`, `readonly_`, `executable_`, `dot_` | `.tmpl` | diff --git a/internal/chezmoi/attr.go b/internal/chezmoi/attr.go index 28fcf69b8e9..06779db9ea8 100644 --- a/internal/chezmoi/attr.go +++ b/internal/chezmoi/attr.go @@ -57,6 +57,7 @@ type DirAttr struct { Exact bool Private bool ReadOnly bool + Remove bool } // A FileAttr holds attributes parsed from a source file name. @@ -80,7 +81,12 @@ func parseDirAttr(sourceName string) DirAttr { exact = false private = false readOnly = false + remove = false ) + if strings.HasPrefix(name, removePrefix) { + name = mustTrimPrefix(name, removePrefix) + remove = true + } if strings.HasPrefix(name, exactPrefix) { name = mustTrimPrefix(name, exactPrefix) exact = true @@ -104,6 +110,7 @@ func parseDirAttr(sourceName string) DirAttr { Exact: exact, Private: private, ReadOnly: readOnly, + Remove: remove, } } @@ -119,6 +126,9 @@ func (da DirAttr) MarshalZerologObject(e *zerolog.Event) { // SourceName returns da's source name. func (da DirAttr) SourceName() string { sourceName := "" + if da.Remove { + sourceName += removePrefix + } if da.Exact { sourceName += exactPrefix } diff --git a/internal/chezmoi/attr_test.go b/internal/chezmoi/attr_test.go index 6b454ddacd1..bbfdf221ca7 100644 --- a/internal/chezmoi/attr_test.go +++ b/internal/chezmoi/attr_test.go @@ -15,6 +15,7 @@ func TestDirAttr(t *testing.T) { Exact []bool Private []bool ReadOnly []bool + Remove []bool }{ TargetName: []string{ ".dir", @@ -32,6 +33,7 @@ func TestDirAttr(t *testing.T) { Exact: []bool{false, true}, Private: []bool{false, true}, ReadOnly: []bool{false, true}, + Remove: []bool{false, true}, } var dirAttrs []DirAttr require.NoError(t, combinator.Generate(&dirAttrs, testData)) diff --git a/internal/chezmoi/debugsystem.go b/internal/chezmoi/debugsystem.go index 9d61fb5e4fc..94a7a949a66 100644 --- a/internal/chezmoi/debugsystem.go +++ b/internal/chezmoi/debugsystem.go @@ -130,6 +130,15 @@ func (s *DebugSystem) Readlink(name AbsPath) (string, error) { return linkname, err } +// Remove implements System.Remove. +func (s *DebugSystem) Remove(name AbsPath) error { + err := s.system.Remove(name) + s.logger.Err(err). + Stringer("name", name). + Msg("Remove") + return err +} + // RemoveAll implements System.RemoveAll. func (s *DebugSystem) RemoveAll(name AbsPath) error { err := s.system.RemoveAll(name) diff --git a/internal/chezmoi/dryrunsystem.go b/internal/chezmoi/dryrunsystem.go index f916dd85102..542004956e7 100644 --- a/internal/chezmoi/dryrunsystem.go +++ b/internal/chezmoi/dryrunsystem.go @@ -85,6 +85,12 @@ func (s *DryRunSystem) Readlink(name AbsPath) (string, error) { return s.system.Readlink(name) } +// Remove implements System.Remove. +func (s *DryRunSystem) Remove(AbsPath) error { + s.setModified() + return nil +} + // RemoveAll implements System.RemoveAll. func (s *DryRunSystem) RemoveAll(AbsPath) error { s.setModified() diff --git a/internal/chezmoi/erroronwritesystem.go b/internal/chezmoi/erroronwritesystem.go index a1ba67cb52a..17142c28f3c 100644 --- a/internal/chezmoi/erroronwritesystem.go +++ b/internal/chezmoi/erroronwritesystem.go @@ -77,6 +77,11 @@ func (s *ErrorOnWriteSystem) Readlink(name AbsPath) (string, error) { return s.system.Readlink(name) } +// Remove implements System.Remove. +func (s *ErrorOnWriteSystem) Remove(AbsPath) error { + return s.err +} + // RemoveAll implements System.RemoveAll. func (s *ErrorOnWriteSystem) RemoveAll(AbsPath) error { return s.err diff --git a/internal/chezmoi/externaldiffsystem.go b/internal/chezmoi/externaldiffsystem.go index 74ddaea7473..e2d832c0df1 100644 --- a/internal/chezmoi/externaldiffsystem.go +++ b/internal/chezmoi/externaldiffsystem.go @@ -107,6 +107,14 @@ func (s *ExternalDiffSystem) Readlink(name AbsPath) (string, error) { return s.system.Readlink(name) } +// Remove implements System.Remove. +func (s *ExternalDiffSystem) Remove(name AbsPath) error { + if err := s.runDiffCommand(name, devNullAbsPath); err != nil { + return err + } + return s.system.Remove(name) +} + // RemoveAll implements System.RemoveAll. func (s *ExternalDiffSystem) RemoveAll(name AbsPath) error { if err := s.runDiffCommand(name, devNullAbsPath); err != nil { diff --git a/internal/chezmoi/gitdiffsystem.go b/internal/chezmoi/gitdiffsystem.go index e12207af4e3..a661b0b80dc 100644 --- a/internal/chezmoi/gitdiffsystem.go +++ b/internal/chezmoi/gitdiffsystem.go @@ -125,6 +125,14 @@ func (s *GitDiffSystem) Readlink(name AbsPath) (string, error) { return s.system.Readlink(name) } +// Remove implements System.Remove. +func (s *GitDiffSystem) Remove(name AbsPath) error { + if err := s.encodeDiff(name, nil, 0); err != nil { + return err + } + return s.system.Remove(name) +} + // RemoveAll implements System.RemoveAll. func (s *GitDiffSystem) RemoveAll(name AbsPath) error { if s.include.Include(EntryTypeRemove) { diff --git a/internal/chezmoi/realsystem.go b/internal/chezmoi/realsystem.go index 62feb5a8561..98fbea10b60 100644 --- a/internal/chezmoi/realsystem.go +++ b/internal/chezmoi/realsystem.go @@ -66,6 +66,11 @@ func (s *RealSystem) ReadFile(name AbsPath) ([]byte, error) { return s.fileSystem.ReadFile(name.String()) } +// Remove implements System.Remove. +func (s *RealSystem) Remove(name AbsPath) error { + return s.fileSystem.Remove(name.String()) +} + // RemoveAll implements System.RemoveAll. func (s *RealSystem) RemoveAll(name AbsPath) error { return s.fileSystem.RemoveAll(name.String()) diff --git a/internal/chezmoi/sourcestate.go b/internal/chezmoi/sourcestate.go index dfb16f62944..ad67b13226d 100644 --- a/internal/chezmoi/sourcestate.go +++ b/internal/chezmoi/sourcestate.go @@ -70,6 +70,7 @@ var externalCacheFormat = formatGzippedJSON{} // A SourceState is a source state. type SourceState struct { root sourceStateEntryTreeNode + removeDirs map[RelPath]struct{} baseSystem System system System sourceDirAbsPath AbsPath @@ -224,6 +225,7 @@ type targetStateEntryFunc func(System, AbsPath) (TargetStateEntry, error) // NewSourceState creates a new source state with the given options. func NewSourceState(options ...SourceStateOption) *SourceState { s := &SourceState{ + removeDirs: make(map[RelPath]struct{}), umask: Umask, encryption: NoEncryption{}, ignore: newPatternSet(), @@ -524,9 +526,9 @@ type ApplyOptions struct { Umask fs.FileMode } -// Apply updates targetRelPath in targetDir in destSystem to match s. +// Apply updates targetRelPath in targetDirAbsPath in destSystem to match s. func (s *SourceState) Apply( - targetSystem, destSystem System, persistentState PersistentState, targetDir AbsPath, targetRelPath RelPath, + targetSystem, destSystem System, persistentState PersistentState, targetDirAbsPath AbsPath, targetRelPath RelPath, options ApplyOptions, ) error { sourceStateEntry := s.root.Get(targetRelPath) @@ -547,7 +549,7 @@ func (s *SourceState) Apply( return nil } - targetAbsPath := targetDir.Join(targetRelPath) + targetAbsPath := targetDirAbsPath.Join(targetRelPath) targetEntryState, err := targetStateEntry.EntryState(options.Umask) if err != nil { @@ -728,6 +730,46 @@ func (s *SourceState) MustEntry(targetRelPath RelPath) SourceStateEntry { return sourceStateEntry } +// PostApply performs all updates required after s.Apply. +func (s *SourceState) PostApply(targetSystem System, targetDirAbsPath AbsPath, targetRelPaths RelPaths) error { + // Remove empty directories with the remove_ attribute. This assumes that + // targetRelPaths is already sorted and iterates in reverse order so that + // children are removed before their parents. +TARGET: + for i := len(targetRelPaths) - 1; i >= 0; i-- { + targetRelPath := targetRelPaths[i] + if _, ok := s.removeDirs[targetRelPath]; !ok { + continue + } + + // Ensure that we are attempting to remove a directory, not any other entry type. + targetAbsPath := targetDirAbsPath.Join(targetRelPath) + switch fileInfo, err := targetSystem.Stat(targetAbsPath); { + case errors.Is(err, fs.ErrNotExist): + continue TARGET + case err != nil: + return err + case !fileInfo.IsDir(): + return fmt.Errorf("%s: not a directory", targetAbsPath) + } + + // Attempt to remove the directory, but ignore any "not exist" or "not + // empty" errors. + switch err := targetSystem.Remove(targetAbsPath); { + case err == nil: + // Do nothing. + case errors.Is(err, fs.ErrExist): + // Do nothing. + case errors.Is(err, fs.ErrNotExist): + // Do nothing. + default: + return err + } + } + + return nil +} + // ReadOptions are options to SourceState.Read. type ReadOptions struct { RefreshExternals bool @@ -843,8 +885,11 @@ func (s *SourceState) Read(ctx context.Context, options *ReadOptions) error { if s.Ignore(targetRelPath) { return vfs.SkipDir } - sourceStateEntry := s.newSourceStateDir(sourceRelPath, da) - allSourceStateEntries[targetRelPath] = append(allSourceStateEntries[targetRelPath], sourceStateEntry) + sourceStateDir := s.newSourceStateDir(sourceRelPath, da) + allSourceStateEntries[targetRelPath] = append(allSourceStateEntries[targetRelPath], sourceStateDir) + if sourceStateDir.Attr.Remove { + s.removeDirs[targetRelPath] = struct{}{} + } return nil case fileInfo.Mode().IsRegular(): fa := parseFileAttr(sourceName.String(), s.encryption.EncryptedSuffix()) diff --git a/internal/chezmoi/sourcestate_test.go b/internal/chezmoi/sourcestate_test.go index 95b66c45148..c6bdce3920e 100644 --- a/internal/chezmoi/sourcestate_test.go +++ b/internal/chezmoi/sourcestate_test.go @@ -1540,10 +1540,12 @@ func TestWalkSourceDir(t *testing.T) { assert.Equal(t, expectedAbsPaths, actualAbsPaths) } -// applyAll updates targetDir in targetSystem to match s. -func (s *SourceState) applyAll(targetSystem, destSystem System, persistentState PersistentState, targetDir AbsPath, options ApplyOptions) error { +// applyAll updates targetDirAbsPath in targetSystem to match s. +func (s *SourceState) applyAll( + targetSystem, destSystem System, persistentState PersistentState, targetDirAbsPath AbsPath, options ApplyOptions, +) error { for _, targetRelPath := range s.TargetRelPaths() { - switch err := s.Apply(targetSystem, destSystem, persistentState, targetDir, targetRelPath, options); { + switch err := s.Apply(targetSystem, destSystem, persistentState, targetDirAbsPath, targetRelPath, options); { case errors.Is(err, Skip): continue case err != nil: diff --git a/internal/chezmoi/system.go b/internal/chezmoi/system.go index 039dcfeaec5..6c6d1e7df08 100644 --- a/internal/chezmoi/system.go +++ b/internal/chezmoi/system.go @@ -23,6 +23,7 @@ type System interface { ReadDir(name AbsPath) ([]fs.DirEntry, error) ReadFile(name AbsPath) ([]byte, error) Readlink(name AbsPath) (string, error) + Remove(name AbsPath) error RemoveAll(name AbsPath) error Rename(oldpath, newpath AbsPath) error RunCmd(cmd *exec.Cmd) error @@ -64,6 +65,10 @@ func (noUpdateSystemMixin) Mkdir(name AbsPath, perm fs.FileMode) error { panic("update to no update system") } +func (noUpdateSystemMixin) Remove(name AbsPath) error { + panic("update to no update system") +} + func (noUpdateSystemMixin) RemoveAll(name AbsPath) error { panic("update to no update system") } diff --git a/internal/cmd/chattrcmd.go b/internal/cmd/chattrcmd.go index 78814154cd9..d40f9d89e66 100644 --- a/internal/cmd/chattrcmd.go +++ b/internal/cmd/chattrcmd.go @@ -62,6 +62,7 @@ type modifier struct { order orderModifier private boolModifier readOnly boolModifier + remove boolModifier template boolModifier } @@ -102,6 +103,7 @@ func (c *Config) chattrCmdValidArgs( "onchange", "private", "readonly", + "remove", "script", "symlink", "template", @@ -367,6 +369,8 @@ func parseModifier(s string) (*modifier, error) { m.private = bm case "readonly", "r": m.readOnly = bm + case "remove": + m.remove = bm case "script": switch bm { case boolModifierClear: @@ -397,6 +401,7 @@ func (m *modifier) modifyDirAttr(dirAttr chezmoi.DirAttr) chezmoi.DirAttr { Exact: m.exact.modify(dirAttr.Exact), Private: m.private.modify(dirAttr.Private), ReadOnly: m.readOnly.modify(dirAttr.ReadOnly), + Remove: m.remove.modify(dirAttr.Remove), } } diff --git a/internal/cmd/config.go b/internal/cmd/config.go index 01a6c84db1f..6e04c111a03 100644 --- a/internal/cmd/config.go +++ b/internal/cmd/config.go @@ -593,6 +593,15 @@ func (c *Config) applyArgs( return err } } + + switch err := sourceState.PostApply(targetSystem, targetDirAbsPath, targetRelPaths); { + case err != nil && c.keepGoing: + c.errorf("%v\n", err) + keptGoingAfterErr = true + case err != nil: + return err + } + if keptGoingAfterErr { return chezmoi.ExitCodeError(1) } diff --git a/internal/cmd/testdata/scripts/removedir.txt b/internal/cmd/testdata/scripts/removedir.txt new file mode 100644 index 00000000000..61efef6c05c --- /dev/null +++ b/internal/cmd/testdata/scripts/removedir.txt @@ -0,0 +1,27 @@ +# test that chezmoi apply removes empty directories, but not non-empty directories, or non-existent directories +mkdir $HOME/.empty_dir +chezmoi apply +exists $HOME/.dir +! exists $HOME/.empty_dir + +chhome home2/user + +# test that chezmoi apply will remove a directory even if it is actually a file +chezmoi apply +! exists $HOME/.dir + +chhome home3/user + +# test that chezmoi apply removes empty directories recursively +mkdir $HOME/.dir/subdir +chezmoi apply +! exists $HOME/.dir + +-- home/user/.dir/file -- +-- home/user/.local/share/chezmoi/remove_dot_dir/.keep -- +-- home/user/.local/share/chezmoi/remove_dot_empty_dir/.keep -- +-- home/user/.local/share/chezmoi/remove_dot_non_existent_dir/.keep -- +-- home2/user/.dir -- +# contents of .dir +-- home2/user/.local/share/chezmoi/remove_dot_dir/.keep -- +-- home3/user/.local/share/chezmoi/remove_dot_dir/remove_subdir/.keep --
feat
Add remove_ attribute for directories
8e301ef5d0cf31ddc532b47cfdd09faee1cc57ea
2023-11-09 06:45:40
Tom Payne
chore: Update dependencies
false
diff --git a/completions/chezmoi-completion.bash b/completions/chezmoi-completion.bash index e63721a1252..65819e529aa 100644 --- a/completions/chezmoi-completion.bash +++ b/completions/chezmoi-completion.bash @@ -21,7 +21,7 @@ __chezmoi_get_completion_results() { local requestComp lastParam lastChar args # Prepare the command to request completions for the program. - # Calling ${words[0]} instead of directly chezmoi allows to handle aliases + # Calling ${words[0]} instead of directly chezmoi allows handling aliases args=("${words[@]:1}") requestComp="${words[0]} __complete ${args[*]}" diff --git a/completions/chezmoi.fish b/completions/chezmoi.fish index 0f9cf8f2c5a..2e2a6464c47 100644 --- a/completions/chezmoi.fish +++ b/completions/chezmoi.fish @@ -79,7 +79,7 @@ function __chezmoi_clear_perform_completion_once_result __chezmoi_debug "" __chezmoi_debug "========= clearing previously set __chezmoi_perform_completion_once_result variable ==========" set --erase __chezmoi_perform_completion_once_result - __chezmoi_debug "Succesfully erased the variable __chezmoi_perform_completion_once_result" + __chezmoi_debug "Successfully erased the variable __chezmoi_perform_completion_once_result" end function __chezmoi_requires_order_preservation diff --git a/completions/chezmoi.ps1 b/completions/chezmoi.ps1 index bbc3f24e684..2912f5238e6 100644 --- a/completions/chezmoi.ps1 +++ b/completions/chezmoi.ps1 @@ -10,7 +10,7 @@ filter __chezmoi_escapeStringWithSpecialChars { $_ -replace '\s|#|@|\$|;|,|''|\{|\}|\(|\)|"|`|\||<|>|&','`$&' } -[scriptblock]$__chezmoiCompleterBlock = { +[scriptblock]${__chezmoiCompleterBlock} = { param( $WordToComplete, $CommandAst, @@ -85,7 +85,7 @@ filter __chezmoi_escapeStringWithSpecialChars { __chezmoi_debug "Calling $RequestComp" # First disable ActiveHelp which is not supported for Powershell - $env:CHEZMOI_ACTIVE_HELP=0 + ${env:CHEZMOI_ACTIVE_HELP}=0 #call the command store the output in $out and redirect stderr and stdout to null # $Out is an array contains each line per element @@ -242,4 +242,4 @@ filter __chezmoi_escapeStringWithSpecialChars { } } -Register-ArgumentCompleter -CommandName 'chezmoi' -ScriptBlock $__chezmoiCompleterBlock +Register-ArgumentCompleter -CommandName 'chezmoi' -ScriptBlock ${__chezmoiCompleterBlock} diff --git a/go.mod b/go.mod index 1e3ede1a919..52a6359adb5 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/Shopify/ejson v1.4.1 github.com/alecthomas/assert/v2 v2.4.0 github.com/aws/aws-sdk-go-v2 v1.22.1 - github.com/aws/aws-sdk-go-v2/config v1.22.0 + github.com/aws/aws-sdk-go-v2/config v1.22.2 github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.23.0 github.com/bmatcuk/doublestar/v4 v4.6.1 github.com/bradenhilton/mozillainstallhash v1.0.1 @@ -33,7 +33,7 @@ require ( github.com/rogpeppe/go-internal v1.11.0 github.com/rs/zerolog v1.31.0 github.com/sergi/go-diff v1.1.0 - github.com/spf13/cobra v1.7.0 + github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 github.com/tailscale/hujson v0.0.0-20221223112325-20486734a56a github.com/twpayne/go-pinentry v0.3.0 @@ -44,12 +44,12 @@ require ( github.com/withfig/autocomplete-tools/integrations/cobra v1.2.1 github.com/zalando/go-keyring v0.2.3 go.etcd.io/bbolt v1.3.8 - golang.org/x/crypto v0.14.0 - golang.org/x/exp v0.0.0-20231006140011-7918f672742d - golang.org/x/oauth2 v0.13.0 - golang.org/x/sync v0.4.0 - golang.org/x/sys v0.13.0 - golang.org/x/term v0.13.0 + golang.org/x/crypto v0.15.0 + golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 + golang.org/x/oauth2 v0.14.0 + golang.org/x/sync v0.5.0 + golang.org/x/sys v0.14.0 + golang.org/x/term v0.14.0 gopkg.in/ini.v1 v1.67.0 gopkg.in/yaml.v3 v3.0.1 howett.net/plist v1.0.0 @@ -58,7 +58,7 @@ require ( require ( dario.cat/mergo v1.0.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.2.0 // indirect @@ -75,7 +75,7 @@ require ( github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.2 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.1 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.5.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.5.1 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.1 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.17.0 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.0 // indirect @@ -96,13 +96,13 @@ require ( github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect - github.com/golang-jwt/jwt/v5 v5.0.0 // indirect + github.com/golang-jwt/jwt/v5 v5.1.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.4.0 // indirect - github.com/gorilla/css v1.0.0 // indirect + github.com/gorilla/css v1.0.1 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/huandu/xstrings v1.4.0 // indirect github.com/imdario/mergo v0.3.16 // indirect @@ -133,10 +133,10 @@ require ( github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/yuin/goldmark v1.6.0 // indirect github.com/yuin/goldmark-emoji v1.0.2 // indirect - golang.org/x/mod v0.13.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/tools v0.14.0 // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/net v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/tools v0.15.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect diff --git a/go.sum b/go.sum index 69f880fb220..f2e9c0661d0 100644 --- a/go.sum +++ b/go.sum @@ -10,6 +10,8 @@ filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 h1:9kDVnTz3vbfweTqAUmk/a/pH5pWFCHtvRpHYC0G/dcA= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0/go.mod h1:3Ug6Qzto9anB6mGlEdgYMDF5zHQ+wwhEaYR4s17PHMw= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0 h1:fb8kj/Dh4CSwgsOzHeZY4Xh68cFVbzXx+ONXGMY//4w= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0/go.mod h1:uReU2sSxZExRPBAg3qKzmAucSi51+SP1OhohieR821Q= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 h1:BMAjVKJM0U/CYF27gA0ZMmXGkOcvfFtD0oHVZ1TIPRI= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0/go.mod h1:1fXstnBMas5kzG+S3q8UoJcmyU6nUeunJcMDHcRYHhs= github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0 h1:d81/ng9rET2YqdVkVwkb6EXeRrLJIwyGnJcAlAWKwhs= @@ -54,6 +56,8 @@ github.com/aws/aws-sdk-go-v2 v1.22.1 h1:sjnni/AuoTXxHitsIdT0FwmqUuNUuHtufcVDErVF github.com/aws/aws-sdk-go-v2 v1.22.1/go.mod h1:Kd0OJtkW3Q0M0lUWGszapWjEvrXDzRW+D21JNsroB+c= github.com/aws/aws-sdk-go-v2/config v1.22.0 h1:9Mm99OalzZRz0ab5fpodMoHBApHS6pqRNp3M9NmzvDg= github.com/aws/aws-sdk-go-v2/config v1.22.0/go.mod h1:2eWgw5lps8fKI7LZVTrRTYP6HE6k/uEFUuTSHfXwqP0= +github.com/aws/aws-sdk-go-v2/config v1.22.2 h1:fuDAlqkXcf7taDK4i1ejaAzDKajnlvHRQldqz649DeY= +github.com/aws/aws-sdk-go-v2/config v1.22.2/go.mod h1:cBBFBM39pRUzw4dCLuRYkTDeIcscOtfFQNbQcgWnbL4= github.com/aws/aws-sdk-go-v2/credentials v1.15.1 h1:hmf6lAm9hk7uLCfapZn/jL05lm6Uwdbn1B0fgjyuf4M= github.com/aws/aws-sdk-go-v2/credentials v1.15.1/go.mod h1:QTcHga3ZbQOneJuxmGBOCxiClxmp+TlvmjFexAnJ790= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.2 h1:gIeH4+o1MN/caGBWjoGQTUTIu94xD6fI5B2+TcwBf70= @@ -64,6 +68,8 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.1 h1:ZpaV/j48RlPc4AmOZuP github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.1/go.mod h1:R8aXraabD2e3qv1csxM14/X9WF4wFMIY0kH4YEtYD5M= github.com/aws/aws-sdk-go-v2/internal/ini v1.5.0 h1:DqOQvIfmGkXZUVJnl9VRk0AnxyS59tCtX9k1Pyss4Ak= github.com/aws/aws-sdk-go-v2/internal/ini v1.5.0/go.mod h1:VV/Kbw9Mg1GWJOT9WK+oTL3cWZiXtapnNvDSRqTZLsg= +github.com/aws/aws-sdk-go-v2/internal/ini v1.5.1 h1:6zMMQmHFW0F+2bnK2Y66lleMjrmvPU6sbhKVqNcqCMg= +github.com/aws/aws-sdk-go-v2/internal/ini v1.5.1/go.mod h1:VV/Kbw9Mg1GWJOT9WK+oTL3cWZiXtapnNvDSRqTZLsg= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.1 h1:2OXw3ppu1XsB6rqKEMV4tnecTjIY3PRV2U6IP6KPJQo= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.1/go.mod h1:FZB4AdakIqW/yERVdGJA6Z9jraax1beXfhBBnK2wwR8= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.23.0 h1:PXSCgeF51ApT3k+fduqw7IaCxICt1nozWV1iPz7TyxU= @@ -111,6 +117,8 @@ github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8 github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= @@ -152,6 +160,8 @@ github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-jwt/jwt/v5 v5.1.0 h1:UGKbA/IPjtS6zLcdB7i5TyACMgSbOTiR8qzXgw8HWQU= +github.com/golang-jwt/jwt/v5 v5.1.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= @@ -179,6 +189,8 @@ github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 h1:l5lAOZEym3oK3 github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= +github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8= +github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A3b0= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= @@ -314,6 +326,8 @@ github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -369,12 +383,18 @@ golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2Uz golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= +golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= +golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 h1:mchzmB1XO2pMaKFRqk/+MV3mgGG96aqaPXaMifQU47w= +golang.org/x/exp v0.0.0-20231108232855-2478ac86f678/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -385,13 +405,19 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= +golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= +golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -412,6 +438,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= @@ -419,6 +447,8 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= +golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -429,12 +459,16 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= +golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
chore
Update dependencies
b617b4a78dc9cbd27163b8419300734e67743956
2021-09-24 21:59:27
Tom Payne
chore: Don't run conventional commits check on master
false
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9d838da1045..13a9be47ebd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -260,6 +260,7 @@ jobs: go install github.com/twpayne/findtypos@latest findtypos chezmoi . - name: Conventional commits + if: github.event_name == 'pull_request' && github.event.pull_request.number uses: agenthunt/[email protected] with: pr-body-regex: ".*"
chore
Don't run conventional commits check on master
a1196a72c00d5990a4f33433aa8df701b408e4fd
2024-05-01 21:26:14
Tom Payne
chore: Update go.sum
false
diff --git a/go.sum b/go.sum index 9578c66b507..f91246c9eb8 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,23 @@ +cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y= +cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= +cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= +cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/firestore v1.14.0 h1:8aLcKnMPoldYU3YHgu4t2exrKhLQkqaXAGqT0ljrFVw= +cloud.google.com/go/firestore v1.14.0/go.mod h1:96MVaHLsEhbvkBEdZgfN+AS/GIkco1LRpH9Xp9YZfzQ= +cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= +cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= +cloud.google.com/go/longrunning v0.5.4 h1:w8xEcbZodnA2BbW6sVirkkoC+1gP8wS57EUUgGS0GVg= +cloud.google.com/go/longrunning v0.5.4/go.mod h1:zqNVncI0BOP8ST6XQD1+VcvuShMmq7+xFSzOL++V0dI= +cloud.google.com/go/storage v1.35.1 h1:B59ahL//eDfx2IIKFBeT5Atm9wnNmj3+8xG/W4WB//w= +cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= filippo.io/age v1.1.1 h1:pIpO7l151hCnQ4BdyBujnGP2YlUo0uj6sAVNHGBvXHg= filippo.io/age v1.1.1/go.mod h1:l03SrzDUrBkdBx8+IILdnn2KZysqQdbEBUQ4p3sqEQE= +filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= +filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 h1:E+OJmp2tPvt1W+amx48v1eqbjDYsgN+RzP4q16yV5eM= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1/go.mod h1:a6xsAQUZg+VsS3TJ05SRp524Hs4pZ/AeFSr5ENf0Yjo= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 h1:FDif4R1+UUR+00q6wquyX90K7A8dN+R5E8GEadoP7sU= @@ -30,6 +46,8 @@ github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0k github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/Shopify/ejson v1.5.0 h1:SDV5HmQlpn3hSUiw9HV0nOj9tpzup5i0OV71ioLYkpw= github.com/Shopify/ejson v1.5.0/go.mod h1:a4+JLWuTe9+tTofPBGWZoqzf0af6eQKGmFqbxoMSARc= +github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8= +github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= github.com/alecthomas/assert/v2 v2.9.0 h1:ZcLG8ccMEtlMLkLW4gwGpBWBb0N8MUCmsy1lYBVd1xQ= github.com/alecthomas/assert/v2 v2.9.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= github.com/alecthomas/chroma/v2 v2.13.0 h1:VP72+99Fb2zEcYM0MeaWJmV+xQvz5v5cxRHd+ooU1lI= @@ -40,6 +58,8 @@ github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4u github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= +github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= +github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= @@ -82,6 +102,7 @@ github.com/bradenhilton/cityhash v1.0.0 h1:1QauDCwfxwIGwO2jBTJdEBqXgfCusAgQOSgdl github.com/bradenhilton/cityhash v1.0.0/go.mod h1:Wmb8yW1egA9ulrsRX4mxfYx5zq4nBWOCZ+j63oK6uz8= github.com/bradenhilton/mozillainstallhash v1.0.1 h1:JVAVsItiWlLoudJX4L+tIuml+hoxjlzCwkhlENi9yS4= github.com/bradenhilton/mozillainstallhash v1.0.1/go.mod h1:J6cA36kUZrgaTkDl2bHRqI+4i2UKO1ImDB1P1x1PyOA= +github.com/bwesterb/go-ristretto v1.2.3 h1:1w53tCkGhCQ5djbat3+MH0BAQ5Kfgbt56UZQ/JMzngw= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/charmbracelet/bubbles v0.18.0 h1:PYv1A036luoBGroX6VWjQIE9Syf2Wby2oOl/39KLfy0= github.com/charmbracelet/bubbles v0.18.0/go.mod h1:08qhZhtIwzgrtBjAcJnij1t1H0ZRjwHyGsy6AL11PSw= @@ -100,8 +121,12 @@ github.com/containerd/console v1.0.4 h1:F2g4+oChYvBTsASRTz8NP6iIAi97J3TtSAsLbIFn github.com/containerd/console v1.0.4/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.21 h1:1/QdRyBaHHJP61QkWMXlOIBfsgdDeeKfK8SYVUWJKf0= +github.com/creack/pty v1.1.21/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/creack/pty/v2 v2.0.0-20231209135443-03db72c7b76c h1:5l8y/PgjeX1aUyZxXabtAf2ahCYQaqWzlFzQgU16o0U= github.com/creack/pty/v2 v2.0.0-20231209135443-03db72c7b76c/go.mod h1:1gZ4PfMDNcYx8FxDdnF/6HYP327cTeB/ru6UdoWVQvw= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= @@ -116,12 +141,16 @@ github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxK github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dustin/gojson v0.0.0-20160307161227-2e71ec9dd5ad h1:Qk76DOWdOp+GlyDKBAG3Klr9cn7N+LcYc82AZ2S7+cA= github.com/dustin/gojson v0.0.0-20160307161227-2e71ec9dd5ad/go.mod h1:mPKfmRa823oBIgl2r20LeMSpTAteW5j7FLkc0vjmzyQ= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= +github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= +github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= github.com/fatih/semgroup v1.2.0 h1:h/OLXwEM+3NNyAdZEpMiH1OzfplU09i2qXPVThGZvyg= github.com/fatih/semgroup v1.2.0/go.mod h1:1KAD4iIYfXjE4U13B48VM4z9QUwV5Tt8O4rS879kgm8= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= @@ -143,12 +172,16 @@ github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXY github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -160,9 +193,17 @@ github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg= github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= +github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720 h1:zC34cGQu69FG7qzJ3WiKW244WfhDC3xxYMeNOX2gtUQ= +github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g= github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8= @@ -171,8 +212,22 @@ github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJr github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg= github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= +github.com/hashicorp/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= +github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= +github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= @@ -189,16 +244,24 @@ github.com/itchyny/timefmt-go v0.1.5 h1:G0INE2la8S6ru/ZI5JecgyzbbJNs5lG1RcBqa7Jm github.com/itchyny/timefmt-go v0.1.5/go.mod h1:nEP7L+2YmAbT2kZ2HfSs1d8Xtw9LY8D2stDBckWakZ8= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -207,6 +270,8 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb h1:w1g9wNDIE/pHSTmAaUhv4TZQuPBS6GV3mMz5hkgziIU= +github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -226,11 +291,23 @@ github.com/microcosm-cc/bluemonday v1.0.25/go.mod h1:ZIOjCQp1OrzBBPIJmfX4qDYFuhU github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mmcloughlin/avo v0.5.0 h1:nAco9/aI9Lg2kiuROBY6BhCI/z0t5jEvJfjWbL8qXLU= +github.com/mmcloughlin/avo v0.5.0/go.mod h1:ChHFdoV7ql95Wi7vuq2YT1bwCJqiWdZrQ1im3VujLYM= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5 h1:8Q0qkMVC/MmWkpIdlvZgcv2o2jrlF6zqVOh7W5YHdMA= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/montanaflynn/stats v0.7.0 h1:r3y12KyNxj/Sb/iOE46ws+3mS1+MZca1wlHQFPsY/JU= +github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= @@ -241,10 +318,18 @@ github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= +github.com/nats-io/nats.go v1.31.0 h1:/WFBHEc/dOKBF6qf1TZhrdEfTmOZ5JzdJ+Y3m6Y/p7E= +github.com/nats-io/nats.go v1.31.0/go.mod h1:di3Bm5MLsoB4Bx61CBTsxuarI36WbhAwOm8QrW39+i8= +github.com/nats-io/nkeys v0.4.6 h1:IzVe95ru2CT6ta874rt9saQRkWfe2nFj1NtvYSLqMzY= +github.com/nats-io/nkeys v0.4.6/go.mod h1:4DxZNzenSVd1cYQoAa8948QY3QDjrHfcfVADymtkpts= +github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ= +github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.2.1 h1:9TA9+T8+8CUCO2+WYnDLCgrYi9+omqKXyjDtosvtEhg= github.com/pelletier/go-toml/v2 v2.2.1/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= @@ -253,8 +338,12 @@ github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.13.6 h1:JFZT4XbOU7l77xGSpOdW+pwIMqP044IyjXX6FGyEKFo= +github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -264,20 +353,28 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sagikazarmark/crypt v0.17.0 h1:ZA/7pXyjkHoK4bW4mIdnCLvL8hd+Nrbiw7Dqk7D4qUk= +github.com/sagikazarmark/crypt v0.17.0/go.mod h1:SMtHTvdmsZMuY/bpZoqokSoChIrcJ/epOxZN58PbZDg= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f h1:MvTmaQdww/z0Q4wrYjDSCcZ78NoftLQyHBSLW/Cx79Y= +github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A= github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/smarty/assertions v1.15.0 h1:cR//PqUBUiQRakZWqBiFFQ9wb8emQGDb0HeGdqGByCY= @@ -293,6 +390,8 @@ github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= @@ -327,6 +426,8 @@ github.com/twpayne/go-xdg/v6 v6.1.3 h1:viM0S9v4KAc0IRW2xI3Zp8ZkqOCoCxmCmVZ7GTnG0 github.com/twpayne/go-xdg/v6 v6.1.3/go.mod h1:kVT9oShzQ0Cb5r4gzwziZUfluW2sTR72slQC/4N1AXI= github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc= github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk= +github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/yuin/goldmark v1.3.7/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= @@ -341,8 +442,24 @@ github.com/zricethezav/gitleaks/v8 v8.18.2 h1:slo/sMmgs3qA+6Vv6iqVhsCv+gsl3RekQX github.com/zricethezav/gitleaks/v8 v8.18.2/go.mod h1:8F5GrdCpEtyN5R+0MKPubbOPqIHptNckH3F7bYrhT+Y= go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= +go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= +go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= +go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= +go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= +go.etcd.io/etcd/client/v2 v2.305.10 h1:MrmRktzv/XF8CvtQt+P6wLUlURaNpSDJHFZhe//2QE4= +go.etcd.io/etcd/client/v2 v2.305.10/go.mod h1:m3CKZi69HzilhVqtPDcjhSGp+kA1OmbNn0qamH80xjA= +go.etcd.io/etcd/client/v3 v3.5.10 h1:W9TXNZ+oB3MCd/8UjxHTWK5J9Nquw9fQBLJd5ne5/Ao= +go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc= +go.etcd.io/gofail v0.1.0 h1:XItAMIhOojXFQMgrxjnd2EIIHun/d5qL0Pf7FzVTkFg= +go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= @@ -355,6 +472,8 @@ golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2 golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -391,6 +510,8 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2 h1:IRJeR9r1pYWsHKTRe/IInb7lYvbBVIqOgsX/u0mbOWY= +golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= @@ -407,6 +528,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= @@ -415,6 +538,22 @@ golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/api v0.153.0 h1:N1AwGhielyKFaUqH07/ZSIQR3uNPcV7NVw0vj+j4iR4= +google.golang.org/api v0.153.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 h1:wpZ8pe2x1Q3f2KyT5f8oP/fa9rHAKgFPr/HZdNuS+PQ= +google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= @@ -423,6 +562,7 @@ gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0 h1:POO/ycCATvegFmVuPpQzZFJ+pGZeX22Ufu6fibxDVjU= gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -433,5 +573,7 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= howett.net/plist v1.0.1 h1:37GdZ8tP09Q35o9ych3ehygcsL+HqKSwzctveSlarvM= howett.net/plist v1.0.1/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= +mvdan.cc/editorconfig v0.2.1-0.20231228180347-1925077f8eb2 h1:8nmqQGVnHUtHuT+yvuA49lQK0y5il5IOr2PtCBkDI2M= +mvdan.cc/editorconfig v0.2.1-0.20231228180347-1925077f8eb2/go.mod h1:r8RiQJRtzrPrZdcdEs5VCMqvRxAzYDUu9a4S9z7fKh8= mvdan.cc/sh/v3 v3.8.0 h1:ZxuJipLZwr/HLbASonmXtcvvC9HXY9d2lXZHnKGjFc8= mvdan.cc/sh/v3 v3.8.0/go.mod h1:w04623xkgBVo7/IUK89E0g8hBykgEpN0vgOj3RJr6MY=
chore
Update go.sum
3c7d3cd97a6df71568cb882ffb3288694b52f3bd
2024-08-07 04:17:03
Tom Payne
chore: Build with Go 1.22.6
false
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8a30a088be2..85c1abbbb59 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ env: CHOCOLATEY_VERSION: 2.2.2 # https://github.com/chocolatey/choco/releases EDITORCONFIG_CHECKER_VERSION: 3.0.3 # https://github.com/editorconfig-checker/editorconfig-checker/releases FIND_TYPOS_VERSION: 0.0.3 # https://github.com/twpayne/find-typos/tags - GO_VERSION: 1.22.5 # https://go.dev/doc/devel/release + GO_VERSION: 1.22.6 # https://go.dev/doc/devel/release GOFUMPT_VERSION: 0.6.0 # https://github.com/mvdan/gofumpt/releases GOLANGCI_LINT_VERSION: 1.59.1 # https://github.com/golangci/golangci-lint/releases GOLINES_VERSION: 0.12.2 # https://github.com/segmentio/golines/releases
chore
Build with Go 1.22.6
79131debb4cef627eed6df2fe887cab30c1c163b
2024-11-14 04:26:32
Ruslan Sayfutdinov
chore: Use .github/actions/setup-go in govulncheck
false
diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml index 62dc8727291..43660c0f028 100644 --- a/.github/workflows/govulncheck.yml +++ b/.github/workflows/govulncheck.yml @@ -24,14 +24,10 @@ jobs: id: go-version run: | echo go-version="$(awk '/GO_VERSION:/ { print $2 }' .github/workflows/main.yml | tr -d \')" >> "${GITHUB_OUTPUT}" - - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a + - uses: ./.github/actions/setup-go with: - path: | - /home/runner/go/pkg/mod - /home/runner/.cache/go-build - key: govulncheck-${{ runner.os }}-${{ steps.go-version.outputs.go-version }}-${{ hashFiles('**/go.sum') }} - restore-keys: | - govulncheck-${{ runner.os }}-${{ steps.go-version.outputs.go-version }}- + go-version: ${{ steps.go-version.outputs.go-version }} + upload-cache: false - uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee with: cache: false
chore
Use .github/actions/setup-go in govulncheck
66c640cf6e7977a6873afffb43cc76d086745add
2021-01-23 22:29:50
Tom Payne
docs: Add more FAQ entries
false
diff --git a/chezmoi2/cmd/docs.gen.go b/chezmoi2/cmd/docs.gen.go index 96eb6c0a373..022aa15523a 100644 --- a/chezmoi2/cmd/docs.gen.go +++ b/chezmoi2/cmd/docs.gen.go @@ -269,6 +269,8 @@ func init() { "* [I've made changes to both the destination state and the source state that I want to keep. How can I keep them both?](#ive-made-changes-to-both-the-destination-state-and-the-source-state-that-i-want-to-keep-how-can-i-keep-them-both)\n" + "* [Why does chezmoi convert all my template variables to lowercase?](#why-does-chezmoi-convert-all-my-template-variables-to-lowercase)\n" + "* [chezmoi makes `~/.ssh/config` group writeable. How do I stop this?](#chezmoi-makes-sshconfig-group-writeable-how-do-i-stop-this)\n" + + "* [Why doesn't chezmoi use symlinks like GNU Stow?](#why-doesnt-chezmoi-use-symlinks-like-gnu-stow)\n" + + "* [Do I have to use `chezmoi edit` to edit my dotfiles?](#do-i-have-to-use-chezmoi-edit-to-edit-my-dotfiles)\n" + "* [Can I change how chezmoi's source state is represented on disk?](#can-i-change-how-chezmois-source-state-is-represented-on-disk)\n" + "* [gpg encryption fails. What could be wrong?](#gpg-encryption-fails-what-could-be-wrong)\n" + "* [chezmoi reports \"user: lookup userid NNNNN: input/output error\"](#chezmoi-reports-user-lookup-userid-nnnnn-inputoutput-error)\n" + @@ -411,6 +413,63 @@ func init() { "GitHub](https://github.com/twpayne/chezmoi/issues/new?assignees=&labels=enhancement&template=02_feature_request.md&title=)\n" + "if you need this.\n" + "\n" + + "## Why doesn't chezmoi use symlinks like GNU Stow?\n" + + "\n" + + "Symlinks are first class citizens in chezmoi: chezmoi supports creating them,\n" + + "updating them, removing them, and even more advanced features not found\n" + + "elsewhere like having the same symlink point to different targets on different\n" + + "machines by using templates.\n" + + "\n" + + "With chezmoi, you only use symlinks where you really need a symlink, in contrast\n" + + "to some other dotfile managers (e.g. GNU Stow) which require the use of symlinks\n" + + "as a layer of indirection between a dotfile's location (which can be anywhere in\n" + + "your home directory) and a dotfile's content (which needs to be in a centralized\n" + + "directory that you manage with version control). chezmoi solves this problem in\n" + + "a different way.\n" + + "\n" + + "Instead of using a symlink to redirect from the dotfile's location to the\n" + + "centralized directory, chezmoi generates the dotfile in its final location from\n" + + "the contents of the centralized directory. Not only is no symlink is needed,\n" + + "this has the advantages that chezmoi is better able to cope with differences\n" + + "from machine to machine (as a dotfile's contents can be unique to that machine)\n" + + "and the dotfiles that chezmoi creates are just regular files. There's nothing\n" + + "special about dotfiles managed by chezmoi, whereas dotfiles managed with GNU\n" + + "Stow are special because they're actually symlinks to somewhere else.\n" + + "\n" + + "The only advantage to using GNU Stow-style symlinks is that changes that you\n" + + "make to the dotfile's contents in the centralized directory are immediately\n" + + "visible, whereas chezmoi currently requires you to run `chezmoi apply` or\n" + + "`chezmoi edit --apply`. chezmoi will likely get an alternative solution to this\n" + + "too, see [#752](https://github.com/twpayne/chezmoi/issues/752).\n" + + "\n" + + "You can configure chezmoi to work like GNU Stow and have it create a set of\n" + + "symlinks back to a central directory, but this currently requires a bit of\n" + + "manual work (as described in\n" + + "[#167](https://github.com/twpayne/chezmoi/issues/167)). chezmoi might get some\n" + + "automation to help (see [#886](https://github.com/twpayne/chezmoi/issues/886)\n" + + "for example) but it does need some convincing use cases that demonstrate that a\n" + + "symlink from a dotfile's location to its contents in a central directory is\n" + + "better than just having the correct dotfile contents.\n" + + "\n" + + "## Do I have to use `chezmoi edit` to edit my dotfiles?\n" + + "\n" + + "No. `chezmoi edit` is a convenience command that has a couple of useful\n" + + "features, but you don't have to use it. You can also run `chezmoi cd` and then\n" + + "just edit the files in the source state directly. After saving an edited file\n" + + "you can run `chezmoi diff` to check what effect the changes would have, and run\n" + + "`chezmoi apply` if you're happy with them.\n" + + "\n" + + "`chezmoi edit` provides the following useful features:\n" + + "* It opens the correct file in the source state for you, so you don't have to\n" + + " know anything about source state attributes.\n" + + "* If the dotfille is encrypted in the source state, then `chezmoi edit` will\n" + + " decrypt it to a private directory, open that file in your `$EDITOR`, and then\n" + + " re-encrypt the file when you quit your editor. That makes encryption more\n" + + " transparent to the user. With the `--diff` and `--apply` options you can see what\n" + + " would change and apply those changes without having to run `chezmoi diff` or\n" + + " `chezmoi apply`. Note also that the arguments to `chezmoi edit` are the files in\n" + + " their target location.\n" + + "\n" + "## Can I change how chezmoi's source state is represented on disk?\n" + "\n" + "There are a number of criticisms of how chezmoi's source state is represented on\n" + diff --git a/cmd/docs.gen.go b/cmd/docs.gen.go index 1a2e058af6d..0dd1a7b3951 100644 --- a/cmd/docs.gen.go +++ b/cmd/docs.gen.go @@ -269,6 +269,8 @@ func init() { "* [I've made changes to both the destination state and the source state that I want to keep. How can I keep them both?](#ive-made-changes-to-both-the-destination-state-and-the-source-state-that-i-want-to-keep-how-can-i-keep-them-both)\n" + "* [Why does chezmoi convert all my template variables to lowercase?](#why-does-chezmoi-convert-all-my-template-variables-to-lowercase)\n" + "* [chezmoi makes `~/.ssh/config` group writeable. How do I stop this?](#chezmoi-makes-sshconfig-group-writeable-how-do-i-stop-this)\n" + + "* [Why doesn't chezmoi use symlinks like GNU Stow?](#why-doesnt-chezmoi-use-symlinks-like-gnu-stow)\n" + + "* [Do I have to use `chezmoi edit` to edit my dotfiles?](#do-i-have-to-use-chezmoi-edit-to-edit-my-dotfiles)\n" + "* [Can I change how chezmoi's source state is represented on disk?](#can-i-change-how-chezmois-source-state-is-represented-on-disk)\n" + "* [gpg encryption fails. What could be wrong?](#gpg-encryption-fails-what-could-be-wrong)\n" + "* [chezmoi reports \"user: lookup userid NNNNN: input/output error\"](#chezmoi-reports-user-lookup-userid-nnnnn-inputoutput-error)\n" + @@ -411,6 +413,63 @@ func init() { "GitHub](https://github.com/twpayne/chezmoi/issues/new?assignees=&labels=enhancement&template=02_feature_request.md&title=)\n" + "if you need this.\n" + "\n" + + "## Why doesn't chezmoi use symlinks like GNU Stow?\n" + + "\n" + + "Symlinks are first class citizens in chezmoi: chezmoi supports creating them,\n" + + "updating them, removing them, and even more advanced features not found\n" + + "elsewhere like having the same symlink point to different targets on different\n" + + "machines by using templates.\n" + + "\n" + + "With chezmoi, you only use symlinks where you really need a symlink, in contrast\n" + + "to some other dotfile managers (e.g. GNU Stow) which require the use of symlinks\n" + + "as a layer of indirection between a dotfile's location (which can be anywhere in\n" + + "your home directory) and a dotfile's content (which needs to be in a centralized\n" + + "directory that you manage with version control). chezmoi solves this problem in\n" + + "a different way.\n" + + "\n" + + "Instead of using a symlink to redirect from the dotfile's location to the\n" + + "centralized directory, chezmoi generates the dotfile in its final location from\n" + + "the contents of the centralized directory. Not only is no symlink is needed,\n" + + "this has the advantages that chezmoi is better able to cope with differences\n" + + "from machine to machine (as a dotfile's contents can be unique to that machine)\n" + + "and the dotfiles that chezmoi creates are just regular files. There's nothing\n" + + "special about dotfiles managed by chezmoi, whereas dotfiles managed with GNU\n" + + "Stow are special because they're actually symlinks to somewhere else.\n" + + "\n" + + "The only advantage to using GNU Stow-style symlinks is that changes that you\n" + + "make to the dotfile's contents in the centralized directory are immediately\n" + + "visible, whereas chezmoi currently requires you to run `chezmoi apply` or\n" + + "`chezmoi edit --apply`. chezmoi will likely get an alternative solution to this\n" + + "too, see [#752](https://github.com/twpayne/chezmoi/issues/752).\n" + + "\n" + + "You can configure chezmoi to work like GNU Stow and have it create a set of\n" + + "symlinks back to a central directory, but this currently requires a bit of\n" + + "manual work (as described in\n" + + "[#167](https://github.com/twpayne/chezmoi/issues/167)). chezmoi might get some\n" + + "automation to help (see [#886](https://github.com/twpayne/chezmoi/issues/886)\n" + + "for example) but it does need some convincing use cases that demonstrate that a\n" + + "symlink from a dotfile's location to its contents in a central directory is\n" + + "better than just having the correct dotfile contents.\n" + + "\n" + + "## Do I have to use `chezmoi edit` to edit my dotfiles?\n" + + "\n" + + "No. `chezmoi edit` is a convenience command that has a couple of useful\n" + + "features, but you don't have to use it. You can also run `chezmoi cd` and then\n" + + "just edit the files in the source state directly. After saving an edited file\n" + + "you can run `chezmoi diff` to check what effect the changes would have, and run\n" + + "`chezmoi apply` if you're happy with them.\n" + + "\n" + + "`chezmoi edit` provides the following useful features:\n" + + "* It opens the correct file in the source state for you, so you don't have to\n" + + " know anything about source state attributes.\n" + + "* If the dotfille is encrypted in the source state, then `chezmoi edit` will\n" + + " decrypt it to a private directory, open that file in your `$EDITOR`, and then\n" + + " re-encrypt the file when you quit your editor. That makes encryption more\n" + + " transparent to the user. With the `--diff` and `--apply` options you can see what\n" + + " would change and apply those changes without having to run `chezmoi diff` or\n" + + " `chezmoi apply`. Note also that the arguments to `chezmoi edit` are the files in\n" + + " their target location.\n" + + "\n" + "## Can I change how chezmoi's source state is represented on disk?\n" + "\n" + "There are a number of criticisms of how chezmoi's source state is represented on\n" + diff --git a/docs/FAQ.md b/docs/FAQ.md index 6fb430980e8..5818b3240ac 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -12,6 +12,8 @@ * [I've made changes to both the destination state and the source state that I want to keep. How can I keep them both?](#ive-made-changes-to-both-the-destination-state-and-the-source-state-that-i-want-to-keep-how-can-i-keep-them-both) * [Why does chezmoi convert all my template variables to lowercase?](#why-does-chezmoi-convert-all-my-template-variables-to-lowercase) * [chezmoi makes `~/.ssh/config` group writeable. How do I stop this?](#chezmoi-makes-sshconfig-group-writeable-how-do-i-stop-this) +* [Why doesn't chezmoi use symlinks like GNU Stow?](#why-doesnt-chezmoi-use-symlinks-like-gnu-stow) +* [Do I have to use `chezmoi edit` to edit my dotfiles?](#do-i-have-to-use-chezmoi-edit-to-edit-my-dotfiles) * [Can I change how chezmoi's source state is represented on disk?](#can-i-change-how-chezmois-source-state-is-represented-on-disk) * [gpg encryption fails. What could be wrong?](#gpg-encryption-fails-what-could-be-wrong) * [chezmoi reports "user: lookup userid NNNNN: input/output error"](#chezmoi-reports-user-lookup-userid-nnnnn-inputoutput-error) @@ -154,6 +156,63 @@ to control group write permissions for individual files or directories. Please GitHub](https://github.com/twpayne/chezmoi/issues/new?assignees=&labels=enhancement&template=02_feature_request.md&title=) if you need this. +## Why doesn't chezmoi use symlinks like GNU Stow? + +Symlinks are first class citizens in chezmoi: chezmoi supports creating them, +updating them, removing them, and even more advanced features not found +elsewhere like having the same symlink point to different targets on different +machines by using templates. + +With chezmoi, you only use symlinks where you really need a symlink, in contrast +to some other dotfile managers (e.g. GNU Stow) which require the use of symlinks +as a layer of indirection between a dotfile's location (which can be anywhere in +your home directory) and a dotfile's content (which needs to be in a centralized +directory that you manage with version control). chezmoi solves this problem in +a different way. + +Instead of using a symlink to redirect from the dotfile's location to the +centralized directory, chezmoi generates the dotfile in its final location from +the contents of the centralized directory. Not only is no symlink is needed, +this has the advantages that chezmoi is better able to cope with differences +from machine to machine (as a dotfile's contents can be unique to that machine) +and the dotfiles that chezmoi creates are just regular files. There's nothing +special about dotfiles managed by chezmoi, whereas dotfiles managed with GNU +Stow are special because they're actually symlinks to somewhere else. + +The only advantage to using GNU Stow-style symlinks is that changes that you +make to the dotfile's contents in the centralized directory are immediately +visible, whereas chezmoi currently requires you to run `chezmoi apply` or +`chezmoi edit --apply`. chezmoi will likely get an alternative solution to this +too, see [#752](https://github.com/twpayne/chezmoi/issues/752). + +You can configure chezmoi to work like GNU Stow and have it create a set of +symlinks back to a central directory, but this currently requires a bit of +manual work (as described in +[#167](https://github.com/twpayne/chezmoi/issues/167)). chezmoi might get some +automation to help (see [#886](https://github.com/twpayne/chezmoi/issues/886) +for example) but it does need some convincing use cases that demonstrate that a +symlink from a dotfile's location to its contents in a central directory is +better than just having the correct dotfile contents. + +## Do I have to use `chezmoi edit` to edit my dotfiles? + +No. `chezmoi edit` is a convenience command that has a couple of useful +features, but you don't have to use it. You can also run `chezmoi cd` and then +just edit the files in the source state directly. After saving an edited file +you can run `chezmoi diff` to check what effect the changes would have, and run +`chezmoi apply` if you're happy with them. + +`chezmoi edit` provides the following useful features: +* It opens the correct file in the source state for you, so you don't have to + know anything about source state attributes. +* If the dotfille is encrypted in the source state, then `chezmoi edit` will + decrypt it to a private directory, open that file in your `$EDITOR`, and then + re-encrypt the file when you quit your editor. That makes encryption more + transparent to the user. With the `--diff` and `--apply` options you can see what + would change and apply those changes without having to run `chezmoi diff` or + `chezmoi apply`. Note also that the arguments to `chezmoi edit` are the files in + their target location. + ## Can I change how chezmoi's source state is represented on disk? There are a number of criticisms of how chezmoi's source state is represented on
docs
Add more FAQ entries
8ea6d9a4fa218d613e0755549280c56021767387
2023-04-20 22:34:10
Tom Payne
fix: Don't download ignored git-repo externals
false
diff --git a/pkg/chezmoi/sourcestate.go b/pkg/chezmoi/sourcestate.go index be25a4436ba..f68cf49383f 100644 --- a/pkg/chezmoi/sourcestate.go +++ b/pkg/chezmoi/sourcestate.go @@ -1046,6 +1046,9 @@ func (s *SourceState) Read(ctx context.Context, options *ReadOptions) error { // Generate SourceStateCommands for git-repo externals. var gitRepoExternalRelPaths RelPaths for externalRelPath, external := range s.externals { + if s.Ignore(externalRelPath) { + continue + } if external.Type == ExternalTypeGitRepo { gitRepoExternalRelPaths = append(gitRepoExternalRelPaths, externalRelPath) } diff --git a/pkg/cmd/testdata/scripts/issue2937.txtar b/pkg/cmd/testdata/scripts/issue2937.txtar new file mode 100644 index 00000000000..31e21bbe10d --- /dev/null +++ b/pkg/cmd/testdata/scripts/issue2937.txtar @@ -0,0 +1,24 @@ +# test that .chezmoiignore prevents git-repo externals from being downloaded +exec chezmoi apply +! exists .dir + +chhome home2/user + +# test that .chezmoiignore prevents external archives from being downloaded +exec chezmoi apply +! exists .dir + +-- home/user/.local/share/chezmoi/.chezmoiexternal.toml -- +[".dir"] + type = "archive" + url = "https://example.com/does-not-exist.tar.gz" +-- home/user/.local/share/chezmoi/.chezmoiignore -- +.dir +.dir/** +-- home2/user/.local/share/chezmoi/.chezmoiexternal.toml -- +[".dir"] + type = "git-repo" + url = "https://example.com/user/repo.git" +-- home2/user/.local/share/chezmoi/.chezmoiignore -- +.dir +.dir/**
fix
Don't download ignored git-repo externals
c342adf37638d0174b7afa7156c352c1944b5deb
2022-12-29 08:06:37
Tom Payne
fix: Improve error message when state database cannot be locked
false
diff --git a/pkg/chezmoi/boltpersistentstate.go b/pkg/chezmoi/boltpersistentstate.go index 357b914aeef..c2966d269e1 100644 --- a/pkg/chezmoi/boltpersistentstate.go +++ b/pkg/chezmoi/boltpersistentstate.go @@ -5,6 +5,7 @@ import ( "fmt" "io/fs" "os" + "syscall" "time" "go.etcd.io/bbolt" @@ -224,11 +225,15 @@ func (b *BoltPersistentState) open() error { if err := MkdirAll(b.system, b.path.Dir(), fs.ModePerm); err != nil { return err } - db, err := bbolt.Open(b.path.String(), 0o600, &b.options) - if err != nil { + switch db, err := bbolt.Open(b.path.String(), 0o600, &b.options); { + case errors.Is(err, syscall.EINVAL): + // Assume that any EINVAL error is because flock(2) failed. + return fmt.Errorf("open %s: failed to acquire lock: %w", b.path, err) + case err != nil: return fmt.Errorf("open %s: %w", b.path, err) + default: + b.empty = false + b.db = db + return nil } - b.empty = false - b.db = db - return nil }
fix
Improve error message when state database cannot be locked
5ec1ad802b2c3331452740adcdb3a87d3a8a1bf0
2022-05-28 23:26:09
Tom Payne
chore: Update Void Linux test
false
diff --git a/assets/docker/voidlinux.Dockerfile b/assets/docker/voidlinux.Dockerfile index 4737661afb9..e0d1f310c99 100644 --- a/assets/docker/voidlinux.Dockerfile +++ b/assets/docker/voidlinux.Dockerfile @@ -1,6 +1,8 @@ -FROM ghcr.io/void-linux/void-linux:20211130rc01-full-x86_64 +FROM ghcr.io/void-linux/void-linux:20220211rc01-full-x86_64 RUN \ + xbps-install --sync --update --yes ; \ + xbps-install --update --yes xbps && \ xbps-install --sync --update --yes && \ xbps-install --yes age curl gcc git go unzip zip
chore
Update Void Linux test
1e9871783d5998ef59c70a1bc6f9c948a32f3a7c
2025-02-16 22:37:30
Austin Ziegler
chore: Update documentation dependencies
false
diff --git a/assets/chezmoi.io/mkdocs.yml b/assets/chezmoi.io/mkdocs.yml index 92368cc99cb..39b93ead4e7 100644 --- a/assets/chezmoi.io/mkdocs.yml +++ b/assets/chezmoi.io/mkdocs.yml @@ -359,6 +359,7 @@ nav: markdown_extensions: - admonition +- attr_list - meta - pymdownx.details - pymdownx.snippets: diff --git a/pyproject.toml b/pyproject.toml index dd85e5667fa..22d62aec0db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,18 +1,19 @@ [project] name = "chezmoi" -version = "2.52.2" +version = "2.59.1" +classifiers = ["Private :: Do Not Upload"] requires-python = ">=3.10" license = { text = "MIT" } [tool.uv] dev-dependencies = [ - "ruff==0.6.7", - "mkdocs-material==9.5.34", - "mkdocs-mermaid2-plugin==1.1.1", + "mkdocs-material==9.6.2", + "mkdocs-mermaid2-plugin==1.2.1", "mkdocs==1.6.1", - "pymdown-extensions==10.10.1", - "ruamel-yaml==0.18.6", - "taskipy==1.13.0", + "pymdown-extensions==10.14.3", + "ruamel-yaml==0.18.10", + "ruff==0.9.4", + "taskipy==1.14.1", ] [tool.taskipy.tasks] diff --git a/uv.lock b/uv.lock index e337957e0e6..a393d4096b2 100644 --- a/uv.lock +++ b/uv.lock @@ -3,91 +3,99 @@ requires-python = ">=3.10" [[package]] name = "babel" -version = "2.16.0" +version = "2.17.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/2a/74/f1bc80f23eeba13393b7222b11d95ca3af2c1e28edca18af487137eefed9/babel-2.16.0.tar.gz", hash = "sha256:d1f3554ca26605fe173f3de0c65f750f5a42f924499bf134de6423582298e316", size = 9348104 } +sdist = { url = "https://files.pythonhosted.org/packages/7d/6b/d52e42361e1aa00709585ecc30b3f9684b3ab62530771402248b1b1d6240/babel-2.17.0.tar.gz", hash = "sha256:0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d", size = 9951852 } wheels = [ - { url = "https://files.pythonhosted.org/packages/ed/20/bc79bc575ba2e2a7f70e8a1155618bb1301eaa5132a8271373a6903f73f8/babel-2.16.0-py3-none-any.whl", hash = "sha256:368b5b98b37c06b7daf6696391c3240c938b37767d4584413e8438c5c435fa8b", size = 9587599 }, + { url = "https://files.pythonhosted.org/packages/b7/b8/3fe70c75fe32afc4bb507f75563d39bc5642255d1d94f1f23604725780bf/babel-2.17.0-py3-none-any.whl", hash = "sha256:4d0b53093fdfb4b21c92b5213dba5a1b23885afa8383709427046b21c366e5f2", size = 10182537 }, ] [[package]] name = "beautifulsoup4" -version = "4.12.3" +version = "4.13.3" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "soupsieve" }, + { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/b3/ca/824b1195773ce6166d388573fc106ce56d4a805bd7427b624e063596ec58/beautifulsoup4-4.12.3.tar.gz", hash = "sha256:74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051", size = 581181 } +sdist = { url = "https://files.pythonhosted.org/packages/f0/3c/adaf39ce1fb4afdd21b611e3d530b183bb7759c9b673d60db0e347fd4439/beautifulsoup4-4.13.3.tar.gz", hash = "sha256:1bd32405dacc920b42b83ba01644747ed77456a65760e285fbc47633ceddaf8b", size = 619516 } wheels = [ - { url = "https://files.pythonhosted.org/packages/b1/fe/e8c672695b37eecc5cbf43e1d0638d88d66ba3a44c4d321c796f4e59167f/beautifulsoup4-4.12.3-py3-none-any.whl", hash = "sha256:b80878c9f40111313e55da8ba20bdba06d8fa3969fc68304167741bbf9e082ed", size = 147925 }, + { url = "https://files.pythonhosted.org/packages/f9/49/6abb616eb3cbab6a7cca303dc02fdf3836de2e0b834bf966a7f5271a34d8/beautifulsoup4-4.13.3-py3-none-any.whl", hash = "sha256:99045d7d3f08f91f0d656bc9b7efbae189426cd913d830294a15eefa0ea4df16", size = 186015 }, ] [[package]] name = "certifi" -version = "2024.8.30" +version = "2025.1.31" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b0/ee/9b19140fe824b367c04c5e1b369942dd754c4c5462d5674002f75c4dedc1/certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9", size = 168507 } +sdist = { url = "https://files.pythonhosted.org/packages/1c/ab/c9f1e32b7b1bf505bf26f0ef697775960db7932abeb7b516de930ba2705f/certifi-2025.1.31.tar.gz", hash = "sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651", size = 167577 } wheels = [ - { url = "https://files.pythonhosted.org/packages/12/90/3c9ff0512038035f59d279fddeb79f5f1eccd8859f06d6163c58798b9487/certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8", size = 167321 }, + { url = "https://files.pythonhosted.org/packages/38/fc/bce832fd4fd99766c04d1ee0eead6b0ec6486fb100ae5e74c1d91292b982/certifi-2025.1.31-py3-none-any.whl", hash = "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe", size = 166393 }, ] [[package]] name = "charset-normalizer" -version = "3.3.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/63/09/c1bc53dab74b1816a00d8d030de5bf98f724c52c1635e07681d312f20be8/charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5", size = 104809 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/2b/61/095a0aa1a84d1481998b534177c8566fdc50bb1233ea9a0478cd3cc075bd/charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3", size = 194219 }, - { url = "https://files.pythonhosted.org/packages/cc/94/f7cf5e5134175de79ad2059edf2adce18e0685ebdb9227ff0139975d0e93/charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027", size = 122521 }, - { url = "https://files.pythonhosted.org/packages/46/6a/d5c26c41c49b546860cc1acabdddf48b0b3fb2685f4f5617ac59261b44ae/charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03", size = 120383 }, - { url = "https://files.pythonhosted.org/packages/b8/60/e2f67915a51be59d4539ed189eb0a2b0d292bf79270410746becb32bc2c3/charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d", size = 138223 }, - { url = "https://files.pythonhosted.org/packages/05/8c/eb854996d5fef5e4f33ad56927ad053d04dc820e4a3d39023f35cad72617/charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e", size = 148101 }, - { url = "https://files.pythonhosted.org/packages/f6/93/bb6cbeec3bf9da9b2eba458c15966658d1daa8b982c642f81c93ad9b40e1/charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6", size = 140699 }, - { url = "https://files.pythonhosted.org/packages/da/f1/3702ba2a7470666a62fd81c58a4c40be00670e5006a67f4d626e57f013ae/charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5", size = 142065 }, - { url = "https://files.pythonhosted.org/packages/3f/ba/3f5e7be00b215fa10e13d64b1f6237eb6ebea66676a41b2bcdd09fe74323/charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537", size = 144505 }, - { url = "https://files.pythonhosted.org/packages/33/c3/3b96a435c5109dd5b6adc8a59ba1d678b302a97938f032e3770cc84cd354/charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c", size = 139425 }, - { url = "https://files.pythonhosted.org/packages/43/05/3bf613e719efe68fb3a77f9c536a389f35b95d75424b96b426a47a45ef1d/charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12", size = 145287 }, - { url = "https://files.pythonhosted.org/packages/58/78/a0bc646900994df12e07b4ae5c713f2b3e5998f58b9d3720cce2aa45652f/charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f", size = 149929 }, - { url = "https://files.pythonhosted.org/packages/eb/5c/97d97248af4920bc68687d9c3b3c0f47c910e21a8ff80af4565a576bd2f0/charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269", size = 141605 }, - { url = "https://files.pythonhosted.org/packages/a8/31/47d018ef89f95b8aded95c589a77c072c55e94b50a41aa99c0a2008a45a4/charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519", size = 142646 }, - { url = "https://files.pythonhosted.org/packages/ae/d5/4fecf1d58bedb1340a50f165ba1c7ddc0400252d6832ff619c4568b36cc0/charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73", size = 92846 }, - { url = "https://files.pythonhosted.org/packages/a2/a0/4af29e22cb5942488cf45630cbdd7cefd908768e69bdd90280842e4e8529/charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09", size = 100343 }, - { url = "https://files.pythonhosted.org/packages/68/77/02839016f6fbbf808e8b38601df6e0e66c17bbab76dff4613f7511413597/charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db", size = 191647 }, - { url = "https://files.pythonhosted.org/packages/3e/33/21a875a61057165e92227466e54ee076b73af1e21fe1b31f1e292251aa1e/charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96", size = 121434 }, - { url = "https://files.pythonhosted.org/packages/dd/51/68b61b90b24ca35495956b718f35a9756ef7d3dd4b3c1508056fa98d1a1b/charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e", size = 118979 }, - { url = "https://files.pythonhosted.org/packages/e4/a6/7ee57823d46331ddc37dd00749c95b0edec2c79b15fc0d6e6efb532e89ac/charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f", size = 136582 }, - { url = "https://files.pythonhosted.org/packages/74/f1/0d9fe69ac441467b737ba7f48c68241487df2f4522dd7246d9426e7c690e/charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574", size = 146645 }, - { url = "https://files.pythonhosted.org/packages/05/31/e1f51c76db7be1d4aef220d29fbfa5dbb4a99165d9833dcbf166753b6dc0/charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4", size = 139398 }, - { url = "https://files.pythonhosted.org/packages/40/26/f35951c45070edc957ba40a5b1db3cf60a9dbb1b350c2d5bef03e01e61de/charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8", size = 140273 }, - { url = "https://files.pythonhosted.org/packages/07/07/7e554f2bbce3295e191f7e653ff15d55309a9ca40d0362fcdab36f01063c/charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc", size = 142577 }, - { url = "https://files.pythonhosted.org/packages/d8/b5/eb705c313100defa57da79277d9207dc8d8e45931035862fa64b625bfead/charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae", size = 137747 }, - { url = "https://files.pythonhosted.org/packages/19/28/573147271fd041d351b438a5665be8223f1dd92f273713cb882ddafe214c/charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887", size = 143375 }, - { url = "https://files.pythonhosted.org/packages/cf/7c/f3b682fa053cc21373c9a839e6beba7705857075686a05c72e0f8c4980ca/charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae", size = 148474 }, - { url = "https://files.pythonhosted.org/packages/1e/49/7ab74d4ac537ece3bc3334ee08645e231f39f7d6df6347b29a74b0537103/charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce", size = 140232 }, - { url = "https://files.pythonhosted.org/packages/2d/dc/9dacba68c9ac0ae781d40e1a0c0058e26302ea0660e574ddf6797a0347f7/charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f", size = 140859 }, - { url = "https://files.pythonhosted.org/packages/6c/c2/4a583f800c0708dd22096298e49f887b49d9746d0e78bfc1d7e29816614c/charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab", size = 92509 }, - { url = "https://files.pythonhosted.org/packages/57/ec/80c8d48ac8b1741d5b963797b7c0c869335619e13d4744ca2f67fc11c6fc/charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77", size = 99870 }, - { url = "https://files.pythonhosted.org/packages/d1/b2/fcedc8255ec42afee97f9e6f0145c734bbe104aac28300214593eb326f1d/charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8", size = 192892 }, - { url = "https://files.pythonhosted.org/packages/2e/7d/2259318c202f3d17f3fe6438149b3b9e706d1070fe3fcbb28049730bb25c/charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b", size = 122213 }, - { url = "https://files.pythonhosted.org/packages/3a/52/9f9d17c3b54dc238de384c4cb5a2ef0e27985b42a0e5cc8e8a31d918d48d/charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6", size = 119404 }, - { url = "https://files.pythonhosted.org/packages/99/b0/9c365f6d79a9f0f3c379ddb40a256a67aa69c59609608fe7feb6235896e1/charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a", size = 137275 }, - { url = "https://files.pythonhosted.org/packages/91/33/749df346e93d7a30cdcb90cbfdd41a06026317bfbfb62cd68307c1a3c543/charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389", size = 147518 }, - { url = "https://files.pythonhosted.org/packages/72/1a/641d5c9f59e6af4c7b53da463d07600a695b9824e20849cb6eea8a627761/charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa", size = 140182 }, - { url = "https://files.pythonhosted.org/packages/ee/fb/14d30eb4956408ee3ae09ad34299131fb383c47df355ddb428a7331cfa1e/charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b", size = 141869 }, - { url = "https://files.pythonhosted.org/packages/df/3e/a06b18788ca2eb6695c9b22325b6fde7dde0f1d1838b1792a0076f58fe9d/charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed", size = 144042 }, - { url = "https://files.pythonhosted.org/packages/45/59/3d27019d3b447a88fe7e7d004a1e04be220227760264cc41b405e863891b/charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26", size = 138275 }, - { url = "https://files.pythonhosted.org/packages/7b/ef/5eb105530b4da8ae37d506ccfa25057961b7b63d581def6f99165ea89c7e/charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d", size = 144819 }, - { url = "https://files.pythonhosted.org/packages/a2/51/e5023f937d7f307c948ed3e5c29c4b7a3e42ed2ee0b8cdf8f3a706089bf0/charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068", size = 149415 }, - { url = "https://files.pythonhosted.org/packages/24/9d/2e3ef673dfd5be0154b20363c5cdcc5606f35666544381bee15af3778239/charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143", size = 141212 }, - { url = "https://files.pythonhosted.org/packages/5b/ae/ce2c12fcac59cb3860b2e2d76dc405253a4475436b1861d95fe75bdea520/charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4", size = 142167 }, - { url = "https://files.pythonhosted.org/packages/ed/3a/a448bf035dce5da359daf9ae8a16b8a39623cc395a2ffb1620aa1bce62b0/charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7", size = 93041 }, - { url = "https://files.pythonhosted.org/packages/b6/7c/8debebb4f90174074b827c63242c23851bdf00a532489fba57fef3416e40/charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001", size = 100397 }, - { url = "https://files.pythonhosted.org/packages/28/76/e6222113b83e3622caa4bb41032d0b1bf785250607392e1b778aca0b8a7d/charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc", size = 48543 }, +version = "3.4.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz", hash = "sha256:44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3", size = 123188 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0d/58/5580c1716040bc89206c77d8f74418caf82ce519aae06450393ca73475d1/charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91b36a978b5ae0ee86c394f5a54d6ef44db1de0815eb43de826d41d21e4af3de", size = 198013 }, + { url = "https://files.pythonhosted.org/packages/d0/11/00341177ae71c6f5159a08168bcb98c6e6d196d372c94511f9f6c9afe0c6/charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7461baadb4dc00fd9e0acbe254e3d7d2112e7f92ced2adc96e54ef6501c5f176", size = 141285 }, + { url = "https://files.pythonhosted.org/packages/01/09/11d684ea5819e5a8f5100fb0b38cf8d02b514746607934134d31233e02c8/charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e218488cd232553829be0664c2292d3af2eeeb94b32bea483cf79ac6a694e037", size = 151449 }, + { url = "https://files.pythonhosted.org/packages/08/06/9f5a12939db324d905dc1f70591ae7d7898d030d7662f0d426e2286f68c9/charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:80ed5e856eb7f30115aaf94e4a08114ccc8813e6ed1b5efa74f9f82e8509858f", size = 143892 }, + { url = "https://files.pythonhosted.org/packages/93/62/5e89cdfe04584cb7f4d36003ffa2936681b03ecc0754f8e969c2becb7e24/charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b010a7a4fd316c3c484d482922d13044979e78d1861f0e0650423144c616a46a", size = 146123 }, + { url = "https://files.pythonhosted.org/packages/a9/ac/ab729a15c516da2ab70a05f8722ecfccc3f04ed7a18e45c75bbbaa347d61/charset_normalizer-3.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4532bff1b8421fd0a320463030c7520f56a79c9024a4e88f01c537316019005a", size = 147943 }, + { url = "https://files.pythonhosted.org/packages/03/d2/3f392f23f042615689456e9a274640c1d2e5dd1d52de36ab8f7955f8f050/charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d973f03c0cb71c5ed99037b870f2be986c3c05e63622c017ea9816881d2dd247", size = 142063 }, + { url = "https://files.pythonhosted.org/packages/f2/e3/e20aae5e1039a2cd9b08d9205f52142329f887f8cf70da3650326670bddf/charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:3a3bd0dcd373514dcec91c411ddb9632c0d7d92aed7093b8c3bbb6d69ca74408", size = 150578 }, + { url = "https://files.pythonhosted.org/packages/8d/af/779ad72a4da0aed925e1139d458adc486e61076d7ecdcc09e610ea8678db/charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d9c3cdf5390dcd29aa8056d13e8e99526cda0305acc038b96b30352aff5ff2bb", size = 153629 }, + { url = "https://files.pythonhosted.org/packages/c2/b6/7aa450b278e7aa92cf7732140bfd8be21f5f29d5bf334ae987c945276639/charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:2bdfe3ac2e1bbe5b59a1a63721eb3b95fc9b6817ae4a46debbb4e11f6232428d", size = 150778 }, + { url = "https://files.pythonhosted.org/packages/39/f4/d9f4f712d0951dcbfd42920d3db81b00dd23b6ab520419626f4023334056/charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:eab677309cdb30d047996b36d34caeda1dc91149e4fdca0b1a039b3f79d9a807", size = 146453 }, + { url = "https://files.pythonhosted.org/packages/49/2b/999d0314e4ee0cff3cb83e6bc9aeddd397eeed693edb4facb901eb8fbb69/charset_normalizer-3.4.1-cp310-cp310-win32.whl", hash = "sha256:c0429126cf75e16c4f0ad00ee0eae4242dc652290f940152ca8c75c3a4b6ee8f", size = 95479 }, + { url = "https://files.pythonhosted.org/packages/2d/ce/3cbed41cff67e455a386fb5e5dd8906cdda2ed92fbc6297921f2e4419309/charset_normalizer-3.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:9f0b8b1c6d84c8034a44893aba5e767bf9c7a211e313a9605d9c617d7083829f", size = 102790 }, + { url = "https://files.pythonhosted.org/packages/72/80/41ef5d5a7935d2d3a773e3eaebf0a9350542f2cab4eac59a7a4741fbbbbe/charset_normalizer-3.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8bfa33f4f2672964266e940dd22a195989ba31669bd84629f05fab3ef4e2d125", size = 194995 }, + { url = "https://files.pythonhosted.org/packages/7a/28/0b9fefa7b8b080ec492110af6d88aa3dea91c464b17d53474b6e9ba5d2c5/charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28bf57629c75e810b6ae989f03c0828d64d6b26a5e205535585f96093e405ed1", size = 139471 }, + { url = "https://files.pythonhosted.org/packages/71/64/d24ab1a997efb06402e3fc07317e94da358e2585165930d9d59ad45fcae2/charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f08ff5e948271dc7e18a35641d2f11a4cd8dfd5634f55228b691e62b37125eb3", size = 149831 }, + { url = "https://files.pythonhosted.org/packages/37/ed/be39e5258e198655240db5e19e0b11379163ad7070962d6b0c87ed2c4d39/charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:234ac59ea147c59ee4da87a0c0f098e9c8d169f4dc2a159ef720f1a61bbe27cd", size = 142335 }, + { url = "https://files.pythonhosted.org/packages/88/83/489e9504711fa05d8dde1574996408026bdbdbd938f23be67deebb5eca92/charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd4ec41f914fa74ad1b8304bbc634b3de73d2a0889bd32076342a573e0779e00", size = 143862 }, + { url = "https://files.pythonhosted.org/packages/c6/c7/32da20821cf387b759ad24627a9aca289d2822de929b8a41b6241767b461/charset_normalizer-3.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eea6ee1db730b3483adf394ea72f808b6e18cf3cb6454b4d86e04fa8c4327a12", size = 145673 }, + { url = "https://files.pythonhosted.org/packages/68/85/f4288e96039abdd5aeb5c546fa20a37b50da71b5cf01e75e87f16cd43304/charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c96836c97b1238e9c9e3fe90844c947d5afbf4f4c92762679acfe19927d81d77", size = 140211 }, + { url = "https://files.pythonhosted.org/packages/28/a3/a42e70d03cbdabc18997baf4f0227c73591a08041c149e710045c281f97b/charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4d86f7aff21ee58f26dcf5ae81a9addbd914115cdebcbb2217e4f0ed8982e146", size = 148039 }, + { url = "https://files.pythonhosted.org/packages/85/e4/65699e8ab3014ecbe6f5c71d1a55d810fb716bbfd74f6283d5c2aa87febf/charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:09b5e6733cbd160dcc09589227187e242a30a49ca5cefa5a7edd3f9d19ed53fd", size = 151939 }, + { url = "https://files.pythonhosted.org/packages/b1/82/8e9fe624cc5374193de6860aba3ea8070f584c8565ee77c168ec13274bd2/charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:5777ee0881f9499ed0f71cc82cf873d9a0ca8af166dfa0af8ec4e675b7df48e6", size = 149075 }, + { url = "https://files.pythonhosted.org/packages/3d/7b/82865ba54c765560c8433f65e8acb9217cb839a9e32b42af4aa8e945870f/charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:237bdbe6159cff53b4f24f397d43c6336c6b0b42affbe857970cefbb620911c8", size = 144340 }, + { url = "https://files.pythonhosted.org/packages/b5/b6/9674a4b7d4d99a0d2df9b215da766ee682718f88055751e1e5e753c82db0/charset_normalizer-3.4.1-cp311-cp311-win32.whl", hash = "sha256:8417cb1f36cc0bc7eaba8ccb0e04d55f0ee52df06df3ad55259b9a323555fc8b", size = 95205 }, + { url = "https://files.pythonhosted.org/packages/1e/ab/45b180e175de4402dcf7547e4fb617283bae54ce35c27930a6f35b6bef15/charset_normalizer-3.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:d7f50a1f8c450f3925cb367d011448c39239bb3eb4117c36a6d354794de4ce76", size = 102441 }, + { url = "https://files.pythonhosted.org/packages/0a/9a/dd1e1cdceb841925b7798369a09279bd1cf183cef0f9ddf15a3a6502ee45/charset_normalizer-3.4.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:73d94b58ec7fecbc7366247d3b0b10a21681004153238750bb67bd9012414545", size = 196105 }, + { url = "https://files.pythonhosted.org/packages/d3/8c/90bfabf8c4809ecb648f39794cf2a84ff2e7d2a6cf159fe68d9a26160467/charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dad3e487649f498dd991eeb901125411559b22e8d7ab25d3aeb1af367df5efd7", size = 140404 }, + { url = "https://files.pythonhosted.org/packages/ad/8f/e410d57c721945ea3b4f1a04b74f70ce8fa800d393d72899f0a40526401f/charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c30197aa96e8eed02200a83fba2657b4c3acd0f0aa4bdc9f6c1af8e8962e0757", size = 150423 }, + { url = "https://files.pythonhosted.org/packages/f0/b8/e6825e25deb691ff98cf5c9072ee0605dc2acfca98af70c2d1b1bc75190d/charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2369eea1ee4a7610a860d88f268eb39b95cb588acd7235e02fd5a5601773d4fa", size = 143184 }, + { url = "https://files.pythonhosted.org/packages/3e/a2/513f6cbe752421f16d969e32f3583762bfd583848b763913ddab8d9bfd4f/charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc2722592d8998c870fa4e290c2eec2c1569b87fe58618e67d38b4665dfa680d", size = 145268 }, + { url = "https://files.pythonhosted.org/packages/74/94/8a5277664f27c3c438546f3eb53b33f5b19568eb7424736bdc440a88a31f/charset_normalizer-3.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffc9202a29ab3920fa812879e95a9e78b2465fd10be7fcbd042899695d75e616", size = 147601 }, + { url = "https://files.pythonhosted.org/packages/7c/5f/6d352c51ee763623a98e31194823518e09bfa48be2a7e8383cf691bbb3d0/charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:804a4d582ba6e5b747c625bf1255e6b1507465494a40a2130978bda7b932c90b", size = 141098 }, + { url = "https://files.pythonhosted.org/packages/78/d4/f5704cb629ba5ab16d1d3d741396aec6dc3ca2b67757c45b0599bb010478/charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f55e69f030f7163dffe9fd0752b32f070566451afe180f99dbeeb81f511ad8d", size = 149520 }, + { url = "https://files.pythonhosted.org/packages/c5/96/64120b1d02b81785f222b976c0fb79a35875457fa9bb40827678e54d1bc8/charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c4c3e6da02df6fa1410a7680bd3f63d4f710232d3139089536310d027950696a", size = 152852 }, + { url = "https://files.pythonhosted.org/packages/84/c9/98e3732278a99f47d487fd3468bc60b882920cef29d1fa6ca460a1fdf4e6/charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:5df196eb874dae23dcfb968c83d4f8fdccb333330fe1fc278ac5ceeb101003a9", size = 150488 }, + { url = "https://files.pythonhosted.org/packages/13/0e/9c8d4cb99c98c1007cc11eda969ebfe837bbbd0acdb4736d228ccaabcd22/charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e358e64305fe12299a08e08978f51fc21fac060dcfcddd95453eabe5b93ed0e1", size = 146192 }, + { url = "https://files.pythonhosted.org/packages/b2/21/2b6b5b860781a0b49427309cb8670785aa543fb2178de875b87b9cc97746/charset_normalizer-3.4.1-cp312-cp312-win32.whl", hash = "sha256:9b23ca7ef998bc739bf6ffc077c2116917eabcc901f88da1b9856b210ef63f35", size = 95550 }, + { url = "https://files.pythonhosted.org/packages/21/5b/1b390b03b1d16c7e382b561c5329f83cc06623916aab983e8ab9239c7d5c/charset_normalizer-3.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:6ff8a4a60c227ad87030d76e99cd1698345d4491638dfa6673027c48b3cd395f", size = 102785 }, + { url = "https://files.pythonhosted.org/packages/38/94/ce8e6f63d18049672c76d07d119304e1e2d7c6098f0841b51c666e9f44a0/charset_normalizer-3.4.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aabfa34badd18f1da5ec1bc2715cadc8dca465868a4e73a0173466b688f29dda", size = 195698 }, + { url = "https://files.pythonhosted.org/packages/24/2e/dfdd9770664aae179a96561cc6952ff08f9a8cd09a908f259a9dfa063568/charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22e14b5d70560b8dd51ec22863f370d1e595ac3d024cb8ad7d308b4cd95f8313", size = 140162 }, + { url = "https://files.pythonhosted.org/packages/24/4e/f646b9093cff8fc86f2d60af2de4dc17c759de9d554f130b140ea4738ca6/charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8436c508b408b82d87dc5f62496973a1805cd46727c34440b0d29d8a2f50a6c9", size = 150263 }, + { url = "https://files.pythonhosted.org/packages/5e/67/2937f8d548c3ef6e2f9aab0f6e21001056f692d43282b165e7c56023e6dd/charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2d074908e1aecee37a7635990b2c6d504cd4766c7bc9fc86d63f9c09af3fa11b", size = 142966 }, + { url = "https://files.pythonhosted.org/packages/52/ed/b7f4f07de100bdb95c1756d3a4d17b90c1a3c53715c1a476f8738058e0fa/charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:955f8851919303c92343d2f66165294848d57e9bba6cf6e3625485a70a038d11", size = 144992 }, + { url = "https://files.pythonhosted.org/packages/96/2c/d49710a6dbcd3776265f4c923bb73ebe83933dfbaa841c5da850fe0fd20b/charset_normalizer-3.4.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:44ecbf16649486d4aebafeaa7ec4c9fed8b88101f4dd612dcaf65d5e815f837f", size = 147162 }, + { url = "https://files.pythonhosted.org/packages/b4/41/35ff1f9a6bd380303dea55e44c4933b4cc3c4850988927d4082ada230273/charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0924e81d3d5e70f8126529951dac65c1010cdf117bb75eb02dd12339b57749dd", size = 140972 }, + { url = "https://files.pythonhosted.org/packages/fb/43/c6a0b685fe6910d08ba971f62cd9c3e862a85770395ba5d9cad4fede33ab/charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2967f74ad52c3b98de4c3b32e1a44e32975e008a9cd2a8cc8966d6a5218c5cb2", size = 149095 }, + { url = "https://files.pythonhosted.org/packages/4c/ff/a9a504662452e2d2878512115638966e75633519ec11f25fca3d2049a94a/charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c75cb2a3e389853835e84a2d8fb2b81a10645b503eca9bcb98df6b5a43eb8886", size = 152668 }, + { url = "https://files.pythonhosted.org/packages/6c/71/189996b6d9a4b932564701628af5cee6716733e9165af1d5e1b285c530ed/charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:09b26ae6b1abf0d27570633b2b078a2a20419c99d66fb2823173d73f188ce601", size = 150073 }, + { url = "https://files.pythonhosted.org/packages/e4/93/946a86ce20790e11312c87c75ba68d5f6ad2208cfb52b2d6a2c32840d922/charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fa88b843d6e211393a37219e6a1c1df99d35e8fd90446f1118f4216e307e48cd", size = 145732 }, + { url = "https://files.pythonhosted.org/packages/cd/e5/131d2fb1b0dddafc37be4f3a2fa79aa4c037368be9423061dccadfd90091/charset_normalizer-3.4.1-cp313-cp313-win32.whl", hash = "sha256:eb8178fe3dba6450a3e024e95ac49ed3400e506fd4e9e5c32d30adda88cbd407", size = 95391 }, + { url = "https://files.pythonhosted.org/packages/27/f2/4f9a69cc7712b9b5ad8fdb87039fd89abba997ad5cbe690d1835d40405b0/charset_normalizer-3.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:b1ac5992a838106edb89654e0aebfc24f5848ae2547d22c2c3f66454daa11971", size = 102702 }, + { url = "https://files.pythonhosted.org/packages/0e/f6/65ecc6878a89bb1c23a086ea335ad4bf21a588990c3f535a227b9eea9108/charset_normalizer-3.4.1-py3-none-any.whl", hash = "sha256:d98b1668f06378c6dbefec3b92299716b931cd4e6061f3c875a71ced1780ab85", size = 49767 }, ] [[package]] name = "chezmoi" -version = "2.52.2" +version = "2.59.1" source = { virtual = "." } [package.dev-dependencies] @@ -106,24 +114,24 @@ dev = [ [package.metadata.requires-dev] dev = [ { name = "mkdocs", specifier = "==1.6.1" }, - { name = "mkdocs-material", specifier = "==9.5.34" }, - { name = "mkdocs-mermaid2-plugin", specifier = "==1.1.1" }, - { name = "pymdown-extensions", specifier = "==10.10.1" }, - { name = "ruamel-yaml", specifier = "==0.18.6" }, - { name = "ruff", specifier = "==0.6.7" }, - { name = "taskipy", specifier = "==1.13.0" }, + { name = "mkdocs-material", specifier = "==9.6.2" }, + { name = "mkdocs-mermaid2-plugin", specifier = "==1.2.1" }, + { name = "pymdown-extensions", specifier = "==10.14.3" }, + { name = "ruamel-yaml", specifier = "==0.18.10" }, + { name = "ruff", specifier = "==0.9.4" }, + { name = "taskipy", specifier = "==1.14.1" }, ] [[package]] name = "click" -version = "8.1.7" +version = "8.1.8" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "colorama", marker = "platform_system == 'Windows'" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de", size = 336121 } +sdist = { url = "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a", size = 226593 } wheels = [ - { url = "https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", size = 97941 }, + { url = "https://files.pythonhosted.org/packages/7e/d4/7ebdbd03970677812aac39c869717059dbb71a4cfc033ca6e5221787892c/click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2", size = 98188 }, ] [[package]] @@ -137,9 +145,12 @@ wheels = [ [[package]] name = "editorconfig" -version = "0.12.4" +version = "0.17.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/3d/85/7b5c2fac7fdc37d959fab714b13b9acb75884490dcc0e8b1dc5e64105084/EditorConfig-0.12.4.tar.gz", hash = "sha256:24857fa1793917dd9ccf0c7810a07e05404ce9b823521c7dce22a4fb5d125f80", size = 13278 } +sdist = { url = "https://files.pythonhosted.org/packages/b4/29/785595a0d8b30ab8d2486559cfba1d46487b8dcbd99f74960b6b4cca92a4/editorconfig-0.17.0.tar.gz", hash = "sha256:8739052279699840065d3a9f5c125d7d5a98daeefe53b0e5274261d77cb49aa2", size = 13369 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/af/e5/8dba39ea24ca3de0e954e668107692f4dfc13a85300a531fa9a39e83fde4/EditorConfig-0.17.0-py3-none-any.whl", hash = "sha256:fe491719c5f65959ec00b167d07740e7ffec9a3f362038c72b289330b9991dfc", size = 16276 }, +] [[package]] name = "ghp-import" @@ -164,14 +175,14 @@ wheels = [ [[package]] name = "jinja2" -version = "3.1.4" +version = "3.1.5" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "markupsafe" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/ed/55/39036716d19cab0747a5020fc7e907f362fbf48c984b14e62127f7e68e5d/jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369", size = 240245 } +sdist = { url = "https://files.pythonhosted.org/packages/af/92/b3130cbbf5591acf9ade8708c365f3238046ac7cb8ccba6e81abccb0ccff/jinja2-3.1.5.tar.gz", hash = "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb", size = 244674 } wheels = [ - { url = "https://files.pythonhosted.org/packages/31/80/3a54838c3fb461f6fec263ebf3a3a41771bd05190238de3486aae8540c36/jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d", size = 133271 }, + { url = "https://files.pythonhosted.org/packages/bd/0f/2ba5fbcd631e3e88689309dbe978c5769e883e4b84ebfe7da30b43275c5a/jinja2-3.1.5-py3-none-any.whl", hash = "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb", size = 134596 }, ] [[package]] @@ -195,40 +206,60 @@ wheels = [ [[package]] name = "markupsafe" -version = "2.1.5" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/87/5b/aae44c6655f3801e81aa3eef09dbbf012431987ba564d7231722f68df02d/MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b", size = 19384 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e4/54/ad5eb37bf9d51800010a74e4665425831a9db4e7c4e0fde4352e391e808e/MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc", size = 18206 }, - { url = "https://files.pythonhosted.org/packages/6a/4a/a4d49415e600bacae038c67f9fecc1d5433b9d3c71a4de6f33537b89654c/MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5", size = 14079 }, - { url = "https://files.pythonhosted.org/packages/0a/7b/85681ae3c33c385b10ac0f8dd025c30af83c78cec1c37a6aa3b55e67f5ec/MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46", size = 26620 }, - { url = "https://files.pythonhosted.org/packages/7c/52/2b1b570f6b8b803cef5ac28fdf78c0da318916c7d2fe9402a84d591b394c/MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f", size = 25818 }, - { url = "https://files.pythonhosted.org/packages/29/fe/a36ba8c7ca55621620b2d7c585313efd10729e63ef81e4e61f52330da781/MarkupSafe-2.1.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900", size = 25493 }, - { url = "https://files.pythonhosted.org/packages/60/ae/9c60231cdfda003434e8bd27282b1f4e197ad5a710c14bee8bea8a9ca4f0/MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff", size = 30630 }, - { url = "https://files.pythonhosted.org/packages/65/dc/1510be4d179869f5dafe071aecb3f1f41b45d37c02329dfba01ff59e5ac5/MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad", size = 29745 }, - { url = "https://files.pythonhosted.org/packages/30/39/8d845dd7d0b0613d86e0ef89549bfb5f61ed781f59af45fc96496e897f3a/MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd", size = 30021 }, - { url = "https://files.pythonhosted.org/packages/c7/5c/356a6f62e4f3c5fbf2602b4771376af22a3b16efa74eb8716fb4e328e01e/MarkupSafe-2.1.5-cp310-cp310-win32.whl", hash = "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4", size = 16659 }, - { url = "https://files.pythonhosted.org/packages/69/48/acbf292615c65f0604a0c6fc402ce6d8c991276e16c80c46a8f758fbd30c/MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl", hash = "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5", size = 17213 }, - { url = "https://files.pythonhosted.org/packages/11/e7/291e55127bb2ae67c64d66cef01432b5933859dfb7d6949daa721b89d0b3/MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f", size = 18219 }, - { url = "https://files.pythonhosted.org/packages/6b/cb/aed7a284c00dfa7c0682d14df85ad4955a350a21d2e3b06d8240497359bf/MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2", size = 14098 }, - { url = "https://files.pythonhosted.org/packages/1c/cf/35fe557e53709e93feb65575c93927942087e9b97213eabc3fe9d5b25a55/MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced", size = 29014 }, - { url = "https://files.pythonhosted.org/packages/97/18/c30da5e7a0e7f4603abfc6780574131221d9148f323752c2755d48abad30/MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5", size = 28220 }, - { url = "https://files.pythonhosted.org/packages/0c/40/2e73e7d532d030b1e41180807a80d564eda53babaf04d65e15c1cf897e40/MarkupSafe-2.1.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c", size = 27756 }, - { url = "https://files.pythonhosted.org/packages/18/46/5dca760547e8c59c5311b332f70605d24c99d1303dd9a6e1fc3ed0d73561/MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f", size = 33988 }, - { url = "https://files.pythonhosted.org/packages/6d/c5/27febe918ac36397919cd4a67d5579cbbfa8da027fa1238af6285bb368ea/MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a", size = 32718 }, - { url = "https://files.pythonhosted.org/packages/f8/81/56e567126a2c2bc2684d6391332e357589a96a76cb9f8e5052d85cb0ead8/MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f", size = 33317 }, - { url = "https://files.pythonhosted.org/packages/00/0b/23f4b2470accb53285c613a3ab9ec19dc944eaf53592cb6d9e2af8aa24cc/MarkupSafe-2.1.5-cp311-cp311-win32.whl", hash = "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906", size = 16670 }, - { url = "https://files.pythonhosted.org/packages/b7/a2/c78a06a9ec6d04b3445a949615c4c7ed86a0b2eb68e44e7541b9d57067cc/MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl", hash = "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617", size = 17224 }, - { url = "https://files.pythonhosted.org/packages/53/bd/583bf3e4c8d6a321938c13f49d44024dbe5ed63e0a7ba127e454a66da974/MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1", size = 18215 }, - { url = "https://files.pythonhosted.org/packages/48/d6/e7cd795fc710292c3af3a06d80868ce4b02bfbbf370b7cee11d282815a2a/MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4", size = 14069 }, - { url = "https://files.pythonhosted.org/packages/51/b5/5d8ec796e2a08fc814a2c7d2584b55f889a55cf17dd1a90f2beb70744e5c/MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee", size = 29452 }, - { url = "https://files.pythonhosted.org/packages/0a/0d/2454f072fae3b5a137c119abf15465d1771319dfe9e4acbb31722a0fff91/MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5", size = 28462 }, - { url = "https://files.pythonhosted.org/packages/2d/75/fd6cb2e68780f72d47e6671840ca517bda5ef663d30ada7616b0462ad1e3/MarkupSafe-2.1.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b", size = 27869 }, - { url = "https://files.pythonhosted.org/packages/b0/81/147c477391c2750e8fc7705829f7351cf1cd3be64406edcf900dc633feb2/MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a", size = 33906 }, - { url = "https://files.pythonhosted.org/packages/8b/ff/9a52b71839d7a256b563e85d11050e307121000dcebc97df120176b3ad93/MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f", size = 32296 }, - { url = "https://files.pythonhosted.org/packages/88/07/2dc76aa51b481eb96a4c3198894f38b480490e834479611a4053fbf08623/MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169", size = 33038 }, - { url = "https://files.pythonhosted.org/packages/96/0c/620c1fb3661858c0e37eb3cbffd8c6f732a67cd97296f725789679801b31/MarkupSafe-2.1.5-cp312-cp312-win32.whl", hash = "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad", size = 16572 }, - { url = "https://files.pythonhosted.org/packages/3f/14/c3554d512d5f9100a95e737502f4a2323a1959f6d0d01e0d0997b35f7b10/MarkupSafe-2.1.5-cp312-cp312-win_amd64.whl", hash = "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb", size = 17127 }, +version = "3.0.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0", size = 20537 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/90/d08277ce111dd22f77149fd1a5d4653eeb3b3eaacbdfcbae5afb2600eebd/MarkupSafe-3.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8", size = 14357 }, + { url = "https://files.pythonhosted.org/packages/04/e1/6e2194baeae0bca1fae6629dc0cbbb968d4d941469cbab11a3872edff374/MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158", size = 12393 }, + { url = "https://files.pythonhosted.org/packages/1d/69/35fa85a8ece0a437493dc61ce0bb6d459dcba482c34197e3efc829aa357f/MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38a9ef736c01fccdd6600705b09dc574584b89bea478200c5fbf112a6b0d5579", size = 21732 }, + { url = "https://files.pythonhosted.org/packages/22/35/137da042dfb4720b638d2937c38a9c2df83fe32d20e8c8f3185dbfef05f7/MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bbcb445fa71794da8f178f0f6d66789a28d7319071af7a496d4d507ed566270d", size = 20866 }, + { url = "https://files.pythonhosted.org/packages/29/28/6d029a903727a1b62edb51863232152fd335d602def598dade38996887f0/MarkupSafe-3.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57cb5a3cf367aeb1d316576250f65edec5bb3be939e9247ae594b4bcbc317dfb", size = 20964 }, + { url = "https://files.pythonhosted.org/packages/cc/cd/07438f95f83e8bc028279909d9c9bd39e24149b0d60053a97b2bc4f8aa51/MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3809ede931876f5b2ec92eef964286840ed3540dadf803dd570c3b7e13141a3b", size = 21977 }, + { url = "https://files.pythonhosted.org/packages/29/01/84b57395b4cc062f9c4c55ce0df7d3108ca32397299d9df00fedd9117d3d/MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e07c3764494e3776c602c1e78e298937c3315ccc9043ead7e685b7f2b8d47b3c", size = 21366 }, + { url = "https://files.pythonhosted.org/packages/bd/6e/61ebf08d8940553afff20d1fb1ba7294b6f8d279df9fd0c0db911b4bbcfd/MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b424c77b206d63d500bcb69fa55ed8d0e6a3774056bdc4839fc9298a7edca171", size = 21091 }, + { url = "https://files.pythonhosted.org/packages/11/23/ffbf53694e8c94ebd1e7e491de185124277964344733c45481f32ede2499/MarkupSafe-3.0.2-cp310-cp310-win32.whl", hash = "sha256:fcabf5ff6eea076f859677f5f0b6b5c1a51e70a376b0579e0eadef8db48c6b50", size = 15065 }, + { url = "https://files.pythonhosted.org/packages/44/06/e7175d06dd6e9172d4a69a72592cb3f7a996a9c396eee29082826449bbc3/MarkupSafe-3.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:6af100e168aa82a50e186c82875a5893c5597a0c1ccdb0d8b40240b1f28b969a", size = 15514 }, + { url = "https://files.pythonhosted.org/packages/6b/28/bbf83e3f76936960b850435576dd5e67034e200469571be53f69174a2dfd/MarkupSafe-3.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d", size = 14353 }, + { url = "https://files.pythonhosted.org/packages/6c/30/316d194b093cde57d448a4c3209f22e3046c5bb2fb0820b118292b334be7/MarkupSafe-3.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93", size = 12392 }, + { url = "https://files.pythonhosted.org/packages/f2/96/9cdafba8445d3a53cae530aaf83c38ec64c4d5427d975c974084af5bc5d2/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832", size = 23984 }, + { url = "https://files.pythonhosted.org/packages/f1/a4/aefb044a2cd8d7334c8a47d3fb2c9f328ac48cb349468cc31c20b539305f/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84", size = 23120 }, + { url = "https://files.pythonhosted.org/packages/8d/21/5e4851379f88f3fad1de30361db501300d4f07bcad047d3cb0449fc51f8c/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca", size = 23032 }, + { url = "https://files.pythonhosted.org/packages/00/7b/e92c64e079b2d0d7ddf69899c98842f3f9a60a1ae72657c89ce2655c999d/MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798", size = 24057 }, + { url = "https://files.pythonhosted.org/packages/f9/ac/46f960ca323037caa0a10662ef97d0a4728e890334fc156b9f9e52bcc4ca/MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e", size = 23359 }, + { url = "https://files.pythonhosted.org/packages/69/84/83439e16197337b8b14b6a5b9c2105fff81d42c2a7c5b58ac7b62ee2c3b1/MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4", size = 23306 }, + { url = "https://files.pythonhosted.org/packages/9a/34/a15aa69f01e2181ed8d2b685c0d2f6655d5cca2c4db0ddea775e631918cd/MarkupSafe-3.0.2-cp311-cp311-win32.whl", hash = "sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d", size = 15094 }, + { url = "https://files.pythonhosted.org/packages/da/b8/3a3bd761922d416f3dc5d00bfbed11f66b1ab89a0c2b6e887240a30b0f6b/MarkupSafe-3.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b", size = 15521 }, + { url = "https://files.pythonhosted.org/packages/22/09/d1f21434c97fc42f09d290cbb6350d44eb12f09cc62c9476effdb33a18aa/MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf", size = 14274 }, + { url = "https://files.pythonhosted.org/packages/6b/b0/18f76bba336fa5aecf79d45dcd6c806c280ec44538b3c13671d49099fdd0/MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225", size = 12348 }, + { url = "https://files.pythonhosted.org/packages/e0/25/dd5c0f6ac1311e9b40f4af06c78efde0f3b5cbf02502f8ef9501294c425b/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028", size = 24149 }, + { url = "https://files.pythonhosted.org/packages/f3/f0/89e7aadfb3749d0f52234a0c8c7867877876e0a20b60e2188e9850794c17/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8", size = 23118 }, + { url = "https://files.pythonhosted.org/packages/d5/da/f2eeb64c723f5e3777bc081da884b414671982008c47dcc1873d81f625b6/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c", size = 22993 }, + { url = "https://files.pythonhosted.org/packages/da/0e/1f32af846df486dce7c227fe0f2398dc7e2e51d4a370508281f3c1c5cddc/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557", size = 24178 }, + { url = "https://files.pythonhosted.org/packages/c4/f6/bb3ca0532de8086cbff5f06d137064c8410d10779c4c127e0e47d17c0b71/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22", size = 23319 }, + { url = "https://files.pythonhosted.org/packages/a2/82/8be4c96ffee03c5b4a034e60a31294daf481e12c7c43ab8e34a1453ee48b/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48", size = 23352 }, + { url = "https://files.pythonhosted.org/packages/51/ae/97827349d3fcffee7e184bdf7f41cd6b88d9919c80f0263ba7acd1bbcb18/MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30", size = 15097 }, + { url = "https://files.pythonhosted.org/packages/c1/80/a61f99dc3a936413c3ee4e1eecac96c0da5ed07ad56fd975f1a9da5bc630/MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87", size = 15601 }, + { url = "https://files.pythonhosted.org/packages/83/0e/67eb10a7ecc77a0c2bbe2b0235765b98d164d81600746914bebada795e97/MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd", size = 14274 }, + { url = "https://files.pythonhosted.org/packages/2b/6d/9409f3684d3335375d04e5f05744dfe7e9f120062c9857df4ab490a1031a/MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430", size = 12352 }, + { url = "https://files.pythonhosted.org/packages/d2/f5/6eadfcd3885ea85fe2a7c128315cc1bb7241e1987443d78c8fe712d03091/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094", size = 24122 }, + { url = "https://files.pythonhosted.org/packages/0c/91/96cf928db8236f1bfab6ce15ad070dfdd02ed88261c2afafd4b43575e9e9/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396", size = 23085 }, + { url = "https://files.pythonhosted.org/packages/c2/cf/c9d56af24d56ea04daae7ac0940232d31d5a8354f2b457c6d856b2057d69/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79", size = 22978 }, + { url = "https://files.pythonhosted.org/packages/2a/9f/8619835cd6a711d6272d62abb78c033bda638fdc54c4e7f4272cf1c0962b/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a", size = 24208 }, + { url = "https://files.pythonhosted.org/packages/f9/bf/176950a1792b2cd2102b8ffeb5133e1ed984547b75db47c25a67d3359f77/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca", size = 23357 }, + { url = "https://files.pythonhosted.org/packages/ce/4f/9a02c1d335caabe5c4efb90e1b6e8ee944aa245c1aaaab8e8a618987d816/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c", size = 23344 }, + { url = "https://files.pythonhosted.org/packages/ee/55/c271b57db36f748f0e04a759ace9f8f759ccf22b4960c270c78a394f58be/MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1", size = 15101 }, + { url = "https://files.pythonhosted.org/packages/29/88/07df22d2dd4df40aba9f3e402e6dc1b8ee86297dddbad4872bd5e7b0094f/MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f", size = 15603 }, + { url = "https://files.pythonhosted.org/packages/62/6a/8b89d24db2d32d433dffcd6a8779159da109842434f1dd2f6e71f32f738c/MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c", size = 14510 }, + { url = "https://files.pythonhosted.org/packages/7a/06/a10f955f70a2e5a9bf78d11a161029d278eeacbd35ef806c3fd17b13060d/MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb", size = 12486 }, + { url = "https://files.pythonhosted.org/packages/34/cf/65d4a571869a1a9078198ca28f39fba5fbb910f952f9dbc5220afff9f5e6/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c", size = 25480 }, + { url = "https://files.pythonhosted.org/packages/0c/e3/90e9651924c430b885468b56b3d597cabf6d72be4b24a0acd1fa0e12af67/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d", size = 23914 }, + { url = "https://files.pythonhosted.org/packages/66/8c/6c7cf61f95d63bb866db39085150df1f2a5bd3335298f14a66b48e92659c/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe", size = 23796 }, + { url = "https://files.pythonhosted.org/packages/bb/35/cbe9238ec3f47ac9a7c8b3df7a808e7cb50fe149dc7039f5f454b3fba218/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5", size = 25473 }, + { url = "https://files.pythonhosted.org/packages/e6/32/7621a4382488aa283cc05e8984a9c219abad3bca087be9ec77e89939ded9/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a", size = 24114 }, + { url = "https://files.pythonhosted.org/packages/0d/80/0985960e4b89922cb5a0bac0ed39c5b96cbc1a536a99f30e8c220a996ed9/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9", size = 24098 }, + { url = "https://files.pythonhosted.org/packages/82/78/fedb03c7d5380df2427038ec8d973587e90561b2d90cd472ce9254cf348b/MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6", size = 15208 }, + { url = "https://files.pythonhosted.org/packages/4f/65/6079a46068dfceaeabb5dcad6d674f5f5c61a6fa5673746f42a9f4c233b3/MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f", size = 15739 }, ] [[package]] @@ -246,7 +277,7 @@ version = "1.6.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "click" }, - { name = "colorama", marker = "platform_system == 'Windows'" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, { name = "ghp-import" }, { name = "jinja2" }, { name = "markdown" }, @@ -280,7 +311,7 @@ wheels = [ [[package]] name = "mkdocs-material" -version = "9.5.34" +version = "9.6.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "babel" }, @@ -295,9 +326,9 @@ dependencies = [ { name = "regex" }, { name = "requests" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/87/79/9b1428841d1d9331561c9d2f22f572b8ceeb67432b383bb1f74f954d92c2/mkdocs_material-9.5.34.tar.gz", hash = "sha256:1e60ddf716cfb5679dfd65900b8a25d277064ed82d9a53cd5190e3f894df7840", size = 3975085 } +sdist = { url = "https://files.pythonhosted.org/packages/c9/75/fb8f772d4acf5439a446aedbe6e49b4c42a4bc4f8c866c930a7b0c3be2f8/mkdocs_material-9.6.2.tar.gz", hash = "sha256:a3de1c5d4c745f10afa78b1a02f917b9dce0808fb206adc0f5bb48b58c1ca21f", size = 3942567 } wheels = [ - { url = "https://files.pythonhosted.org/packages/36/42/d6cc455d37979c5617cab5aac49bd15e07317f7a61a80ce3c49ce23c779f/mkdocs_material-9.5.34-py3-none-any.whl", hash = "sha256:54caa8be708de2b75167fd4d3b9f3d949579294f49cb242515d4653dbee9227e", size = 8668442 }, + { url = "https://files.pythonhosted.org/packages/d1/17/b97aa245d43933acd416361d4f34612baec8ad4a6337339d45448cde728d/mkdocs_material-9.6.2-py3-none-any.whl", hash = "sha256:71d90dbd63b393ad11a4d90151dfe3dcbfcd802c0f29ce80bebd9bbac6abc753", size = 8688648 }, ] [[package]] @@ -311,7 +342,7 @@ wheels = [ [[package]] name = "mkdocs-mermaid2-plugin" -version = "1.1.1" +version = "1.2.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "beautifulsoup4" }, @@ -321,27 +352,27 @@ dependencies = [ { name = "requests" }, { name = "setuptools" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/6f/e5/6b9cfb9c73b7d3cb0858bcb15b7f2d506272c6e593eefa644b9a1f8130fc/mkdocs-mermaid2-plugin-1.1.1.tar.gz", hash = "sha256:bea5f3cbe6cb76bad21b81e49a01e074427ed466666c5d404e62fe8698bc2d7c", size = 1857620 } +sdist = { url = "https://files.pythonhosted.org/packages/3e/1a/f580733da1924ebc9b4bb04a34ca63ae62a50b0e62eeb016e78d9dee6d69/mkdocs_mermaid2_plugin-1.2.1.tar.gz", hash = "sha256:9c7694c73a65905ac1578f966e5c193325c4d5a5bc1836727e74ac9f99d0e921", size = 16104 } wheels = [ - { url = "https://files.pythonhosted.org/packages/a5/9a/2933f5609fad97092a054eb51a830b017f0c338e251be8d518d90a3531fb/mkdocs_mermaid2_plugin-1.1.1-py3-none-any.whl", hash = "sha256:4e25876b59d1e151ca33a467207b346404b4a246f4f24af5e44c32408e175882", size = 10074 }, + { url = "https://files.pythonhosted.org/packages/24/ce/c8a41cb0f3044990c8afbdc20c853845a9e940995d4e0cffecafbb5e927b/mkdocs_mermaid2_plugin-1.2.1-py3-none-any.whl", hash = "sha256:22d2cf2c6867d4959a5e0903da2dde78d74581fc0b107b791bc4c7ceb9ce9741", size = 17260 }, ] [[package]] name = "mslex" -version = "1.2.0" +version = "1.3.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b7/ec/530f1098d88f2076038799ddfe29d9b6e4d982df938ef6288e67d18b3f68/mslex-1.2.0.tar.gz", hash = "sha256:79e2abc5a129dd71cdde58a22a2039abb7fa8afcbac498b723ba6e9b9fbacc14", size = 12946 } +sdist = { url = "https://files.pythonhosted.org/packages/e0/97/7022667073c99a0fe028f2e34b9bf76b49a611afd21b02527fbfd92d4cd5/mslex-1.3.0.tar.gz", hash = "sha256:641c887d1d3db610eee2af37a8e5abda3f70b3006cdfd2d0d29dc0d1ae28a85d", size = 11583 } wheels = [ - { url = "https://files.pythonhosted.org/packages/ff/8d/851f9b37f2471b9c77b726af063e43c9f1852914c490b8a83788af2e76d9/mslex-1.2.0-py3-none-any.whl", hash = "sha256:c68ec637485ee3544c5847c1b4e78b02940b32708568fb1d8715491815aa2341", size = 5630 }, + { url = "https://files.pythonhosted.org/packages/64/f2/66bd65ca0139675a0d7b18f0bada6e12b51a984e41a76dbe44761bf1b3ee/mslex-1.3.0-py3-none-any.whl", hash = "sha256:c7074b347201b3466fc077c5692fbce9b5f62a63a51f537a53fbbd02eff2eea4", size = 7820 }, ] [[package]] name = "packaging" -version = "24.1" +version = "24.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002", size = 148788 } +sdist = { url = "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f", size = 163950 } wheels = [ - { url = "https://files.pythonhosted.org/packages/08/aa/cc0199a5f0ad350994d660967a8efb233fe0416e4639146c089643407ce6/packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124", size = 53985 }, + { url = "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759", size = 65451 }, ] [[package]] @@ -373,40 +404,39 @@ wheels = [ [[package]] name = "psutil" -version = "5.9.8" +version = "6.1.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/90/c7/6dc0a455d111f68ee43f27793971cf03fe29b6ef972042549db29eec39a2/psutil-5.9.8.tar.gz", hash = "sha256:6be126e3225486dff286a8fb9a06246a5253f4c7c53b475ea5f5ac934e64194c", size = 503247 } +sdist = { url = "https://files.pythonhosted.org/packages/1f/5a/07871137bb752428aa4b659f910b399ba6f291156bdea939be3e96cae7cb/psutil-6.1.1.tar.gz", hash = "sha256:cf8496728c18f2d0b45198f06895be52f36611711746b7f30c464b422b50e2f5", size = 508502 } wheels = [ - { url = "https://files.pythonhosted.org/packages/fe/5f/c26deb822fd3daf8fde4bdb658bf87d9ab1ffd3fca483816e89a9a9a9084/psutil-5.9.8-cp27-none-win32.whl", hash = "sha256:36f435891adb138ed3c9e58c6af3e2e6ca9ac2f365efe1f9cfef2794e6c93b4e", size = 248660 }, - { url = "https://files.pythonhosted.org/packages/32/1d/cf66073d74d6146187e2d0081a7616df4437214afa294ee4f16f80a2f96a/psutil-5.9.8-cp27-none-win_amd64.whl", hash = "sha256:bd1184ceb3f87651a67b2708d4c3338e9b10c5df903f2e3776b62303b26cb631", size = 251966 }, - { url = "https://files.pythonhosted.org/packages/e7/e3/07ae864a636d70a8a6f58da27cb1179192f1140d5d1da10886ade9405797/psutil-5.9.8-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:aee678c8720623dc456fa20659af736241f575d79429a0e5e9cf88ae0605cc81", size = 248702 }, - { url = "https://files.pythonhosted.org/packages/b3/bd/28c5f553667116b2598b9cc55908ec435cb7f77a34f2bff3e3ca765b0f78/psutil-5.9.8-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8cb6403ce6d8e047495a701dc7c5bd788add903f8986d523e3e20b98b733e421", size = 285242 }, - { url = "https://files.pythonhosted.org/packages/c5/4f/0e22aaa246f96d6ac87fe5ebb9c5a693fbe8877f537a1022527c47ca43c5/psutil-5.9.8-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d06016f7f8625a1825ba3732081d77c94589dca78b7a3fc072194851e88461a4", size = 288191 }, - { url = "https://files.pythonhosted.org/packages/6e/f5/2aa3a4acdc1e5940b59d421742356f133185667dd190b166dbcfcf5d7b43/psutil-5.9.8-cp37-abi3-win32.whl", hash = "sha256:bc56c2a1b0d15aa3eaa5a60c9f3f8e3e565303b465dbf57a1b730e7a2b9844e0", size = 251252 }, - { url = "https://files.pythonhosted.org/packages/93/52/3e39d26feae7df0aa0fd510b14012c3678b36ed068f7d78b8d8784d61f0e/psutil-5.9.8-cp37-abi3-win_amd64.whl", hash = "sha256:8db4c1b57507eef143a15a6884ca10f7c73876cdf5d51e713151c1236a0e68cf", size = 255090 }, - { url = "https://files.pythonhosted.org/packages/05/33/2d74d588408caedd065c2497bdb5ef83ce6082db01289a1e1147f6639802/psutil-5.9.8-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:d16bbddf0693323b8c6123dd804100241da461e41d6e332fb0ba6058f630f8c8", size = 249898 }, + { url = "https://files.pythonhosted.org/packages/61/99/ca79d302be46f7bdd8321089762dd4476ee725fce16fc2b2e1dbba8cac17/psutil-6.1.1-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:fc0ed7fe2231a444fc219b9c42d0376e0a9a1a72f16c5cfa0f68d19f1a0663e8", size = 247511 }, + { url = "https://files.pythonhosted.org/packages/0b/6b/73dbde0dd38f3782905d4587049b9be64d76671042fdcaf60e2430c6796d/psutil-6.1.1-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:0bdd4eab935276290ad3cb718e9809412895ca6b5b334f5a9111ee6d9aff9377", size = 248985 }, + { url = "https://files.pythonhosted.org/packages/17/38/c319d31a1d3f88c5b79c68b3116c129e5133f1822157dd6da34043e32ed6/psutil-6.1.1-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b6e06c20c05fe95a3d7302d74e7097756d4ba1247975ad6905441ae1b5b66003", size = 284488 }, + { url = "https://files.pythonhosted.org/packages/9c/39/0f88a830a1c8a3aba27fededc642da37613c57cbff143412e3536f89784f/psutil-6.1.1-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97f7cb9921fbec4904f522d972f0c0e1f4fabbdd4e0287813b21215074a0f160", size = 287477 }, + { url = "https://files.pythonhosted.org/packages/47/da/99f4345d4ddf2845cb5b5bd0d93d554e84542d116934fde07a0c50bd4e9f/psutil-6.1.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:33431e84fee02bc84ea36d9e2c4a6d395d479c9dd9bba2376c1f6ee8f3a4e0b3", size = 289017 }, + { url = "https://files.pythonhosted.org/packages/38/53/bd755c2896f4461fd4f36fa6a6dcb66a88a9e4b9fd4e5b66a77cf9d4a584/psutil-6.1.1-cp37-abi3-win32.whl", hash = "sha256:eaa912e0b11848c4d9279a93d7e2783df352b082f40111e078388701fd479e53", size = 250602 }, + { url = "https://files.pythonhosted.org/packages/7b/d7/7831438e6c3ebbfa6e01a927127a6cb42ad3ab844247f3c5b96bea25d73d/psutil-6.1.1-cp37-abi3-win_amd64.whl", hash = "sha256:f35cfccb065fff93529d2afb4a2e89e363fe63ca1e4a5da22b603a85833c2649", size = 254444 }, ] [[package]] name = "pygments" -version = "2.18.0" +version = "2.19.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199", size = 4891905 } +sdist = { url = "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz", hash = "sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f", size = 4968581 } wheels = [ - { url = "https://files.pythonhosted.org/packages/f7/3f/01c8b82017c199075f8f788d0d906b9ffbbc5a47dc9918a945e13d5a2bda/pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a", size = 1205513 }, + { url = "https://files.pythonhosted.org/packages/8a/0b/9fcc47d19c48b59121088dd6da2488a49d5f72dacf8262e2790a1d2c7d15/pygments-2.19.1-py3-none-any.whl", hash = "sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c", size = 1225293 }, ] [[package]] name = "pymdown-extensions" -version = "10.10.1" +version = "10.14.3" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "markdown" }, { name = "pyyaml" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/d7/e6/51b83b93b74014ebc415f26de4b60320ccdb4802b6d6e37d4b4070619e20/pymdown_extensions-10.10.1.tar.gz", hash = "sha256:ad277ee4739ced051c3b6328d22ce782358a3bec39bc6ca52815ccbf44f7acdc", size = 828448 } +sdist = { url = "https://files.pythonhosted.org/packages/7c/44/e6de2fdc880ad0ec7547ca2e087212be815efbc9a425a8d5ba9ede602cbb/pymdown_extensions-10.14.3.tar.gz", hash = "sha256:41e576ce3f5d650be59e900e4ceff231e0aed2a88cf30acaee41e02f063a061b", size = 846846 } wheels = [ - { url = "https://files.pythonhosted.org/packages/f5/08/56121d5a6746c192172766c18be90c790018b632ff94598ad3fa39935b73/pymdown_extensions-10.10.1-py3-none-any.whl", hash = "sha256:6c74ea6c2e2285186a241417480fc2d3cc52941b3ec2dced4014c84dc78c5493", size = 258809 }, + { url = "https://files.pythonhosted.org/packages/eb/f5/b9e2a42aa8f9e34d52d66de87941ecd236570c7ed2e87775ed23bbe4e224/pymdown_extensions-10.14.3-py3-none-any.whl", hash = "sha256:05e0bee73d64b9c71a4ae17c72abc2f700e8bc8403755a00580b49a4e9f189e9", size = 264467 }, ] [[package]] @@ -479,71 +509,71 @@ wheels = [ [[package]] name = "regex" -version = "2024.9.11" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f9/38/148df33b4dbca3bd069b963acab5e0fa1a9dbd6820f8c322d0dd6faeff96/regex-2024.9.11.tar.gz", hash = "sha256:6c188c307e8433bcb63dc1915022deb553b4203a70722fc542c363bf120a01fd", size = 399403 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/63/12/497bd6599ce8a239ade68678132296aec5ee25ebea45fc8ba91aa60fceec/regex-2024.9.11-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1494fa8725c285a81d01dc8c06b55287a1ee5e0e382d8413adc0a9197aac6408", size = 482488 }, - { url = "https://files.pythonhosted.org/packages/c1/24/595ddb9bec2a9b151cdaf9565b0c9f3da9f0cb1dca6c158bc5175332ddf8/regex-2024.9.11-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0e12c481ad92d129c78f13a2a3662317e46ee7ef96c94fd332e1c29131875b7d", size = 287443 }, - { url = "https://files.pythonhosted.org/packages/69/a8/b2fb45d9715b1469383a0da7968f8cacc2f83e9fbbcd6b8713752dd980a6/regex-2024.9.11-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:16e13a7929791ac1216afde26f712802e3df7bf0360b32e4914dca3ab8baeea5", size = 284561 }, - { url = "https://files.pythonhosted.org/packages/88/87/1ce4a5357216b19b7055e7d3b0efc75a6e426133bf1e7d094321df514257/regex-2024.9.11-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:46989629904bad940bbec2106528140a218b4a36bb3042d8406980be1941429c", size = 783177 }, - { url = "https://files.pythonhosted.org/packages/3c/65/b9f002ab32f7b68e7d1dcabb67926f3f47325b8dbc22cc50b6a043e1d07c/regex-2024.9.11-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a906ed5e47a0ce5f04b2c981af1c9acf9e8696066900bf03b9d7879a6f679fc8", size = 823193 }, - { url = "https://files.pythonhosted.org/packages/22/91/8339dd3abce101204d246e31bc26cdd7ec07c9f91598472459a3a902aa41/regex-2024.9.11-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e9a091b0550b3b0207784a7d6d0f1a00d1d1c8a11699c1a4d93db3fbefc3ad35", size = 809950 }, - { url = "https://files.pythonhosted.org/packages/cb/19/556638aa11c2ec9968a1da998f07f27ec0abb9bf3c647d7c7985ca0b8eea/regex-2024.9.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5ddcd9a179c0a6fa8add279a4444015acddcd7f232a49071ae57fa6e278f1f71", size = 782661 }, - { url = "https://files.pythonhosted.org/packages/d1/e9/7a5bc4c6ef8d9cd2bdd83a667888fc35320da96a4cc4da5fa084330f53db/regex-2024.9.11-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6b41e1adc61fa347662b09398e31ad446afadff932a24807d3ceb955ed865cc8", size = 772348 }, - { url = "https://files.pythonhosted.org/packages/f1/0b/29f2105bfac3ed08e704914c38e93b07c784a6655f8a015297ee7173e95b/regex-2024.9.11-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ced479f601cd2f8ca1fd7b23925a7e0ad512a56d6e9476f79b8f381d9d37090a", size = 697460 }, - { url = "https://files.pythonhosted.org/packages/71/3a/52ff61054d15a4722605f5872ad03962b319a04c1ebaebe570b8b9b7dde1/regex-2024.9.11-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:635a1d96665f84b292e401c3d62775851aedc31d4f8784117b3c68c4fcd4118d", size = 769151 }, - { url = "https://files.pythonhosted.org/packages/97/07/37e460ab5ca84be8e1e197c3b526c5c86993dcc9e13cbc805c35fc2463c1/regex-2024.9.11-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:c0256beda696edcf7d97ef16b2a33a8e5a875affd6fa6567b54f7c577b30a137", size = 777478 }, - { url = "https://files.pythonhosted.org/packages/65/7b/953075723dd5ab00780043ac2f9de667306ff9e2a85332975e9f19279174/regex-2024.9.11-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:3ce4f1185db3fbde8ed8aa223fc9620f276c58de8b0d4f8cc86fd1360829edb6", size = 845373 }, - { url = "https://files.pythonhosted.org/packages/40/b8/3e9484c6230b8b6e8f816ab7c9a080e631124991a4ae2c27a81631777db0/regex-2024.9.11-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:09d77559e80dcc9d24570da3745ab859a9cf91953062e4ab126ba9d5993688ca", size = 845369 }, - { url = "https://files.pythonhosted.org/packages/b7/99/38434984d912edbd2e1969d116257e869578f67461bd7462b894c45ed874/regex-2024.9.11-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7a22ccefd4db3f12b526eccb129390942fe874a3a9fdbdd24cf55773a1faab1a", size = 773935 }, - { url = "https://files.pythonhosted.org/packages/ab/67/43174d2b46fa947b7b9dfe56b6c8a8a76d44223f35b1d64645a732fd1d6f/regex-2024.9.11-cp310-cp310-win32.whl", hash = "sha256:f745ec09bc1b0bd15cfc73df6fa4f726dcc26bb16c23a03f9e3367d357eeedd0", size = 261624 }, - { url = "https://files.pythonhosted.org/packages/c4/2a/4f9c47d9395b6aff24874c761d8d620c0232f97c43ef3cf668c8b355e7a7/regex-2024.9.11-cp310-cp310-win_amd64.whl", hash = "sha256:01c2acb51f8a7d6494c8c5eafe3d8e06d76563d8a8a4643b37e9b2dd8a2ff623", size = 274020 }, - { url = "https://files.pythonhosted.org/packages/86/a1/d526b7b6095a0019aa360948c143aacfeb029919c898701ce7763bbe4c15/regex-2024.9.11-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:2cce2449e5927a0bf084d346da6cd5eb016b2beca10d0013ab50e3c226ffc0df", size = 482483 }, - { url = "https://files.pythonhosted.org/packages/32/d9/bfdd153179867c275719e381e1e8e84a97bd186740456a0dcb3e7125c205/regex-2024.9.11-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3b37fa423beefa44919e009745ccbf353d8c981516e807995b2bd11c2c77d268", size = 287442 }, - { url = "https://files.pythonhosted.org/packages/33/c4/60f3370735135e3a8d673ddcdb2507a8560d0e759e1398d366e43d000253/regex-2024.9.11-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:64ce2799bd75039b480cc0360907c4fb2f50022f030bf9e7a8705b636e408fad", size = 284561 }, - { url = "https://files.pythonhosted.org/packages/b1/51/91a5ebdff17f9ec4973cb0aa9d37635efec1c6868654bbc25d1543aca4ec/regex-2024.9.11-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a4cc92bb6db56ab0c1cbd17294e14f5e9224f0cc6521167ef388332604e92679", size = 791779 }, - { url = "https://files.pythonhosted.org/packages/07/4a/022c5e6f0891a90cd7eb3d664d6c58ce2aba48bff107b00013f3d6167069/regex-2024.9.11-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d05ac6fa06959c4172eccd99a222e1fbf17b5670c4d596cb1e5cde99600674c4", size = 832605 }, - { url = "https://files.pythonhosted.org/packages/ac/1c/3793990c8c83ca04e018151ddda83b83ecc41d89964f0f17749f027fc44d/regex-2024.9.11-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:040562757795eeea356394a7fb13076ad4f99d3c62ab0f8bdfb21f99a1f85664", size = 818556 }, - { url = "https://files.pythonhosted.org/packages/e9/5c/8b385afbfacb853730682c57be56225f9fe275c5bf02ac1fc88edbff316d/regex-2024.9.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6113c008a7780792efc80f9dfe10ba0cd043cbf8dc9a76ef757850f51b4edc50", size = 792808 }, - { url = "https://files.pythonhosted.org/packages/9b/8b/a4723a838b53c771e9240951adde6af58c829fb6a6a28f554e8131f53839/regex-2024.9.11-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8e5fb5f77c8745a60105403a774fe2c1759b71d3e7b4ca237a5e67ad066c7199", size = 781115 }, - { url = "https://files.pythonhosted.org/packages/83/5f/031a04b6017033d65b261259c09043c06f4ef2d4eac841d0649d76d69541/regex-2024.9.11-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:54d9ff35d4515debf14bc27f1e3b38bfc453eff3220f5bce159642fa762fe5d4", size = 778155 }, - { url = "https://files.pythonhosted.org/packages/fd/cd/4660756070b03ce4a66663a43f6c6e7ebc2266cc6b4c586c167917185eb4/regex-2024.9.11-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:df5cbb1fbc74a8305b6065d4ade43b993be03dbe0f8b30032cced0d7740994bd", size = 784614 }, - { url = "https://files.pythonhosted.org/packages/93/8d/65b9bea7df120a7be8337c415b6d256ba786cbc9107cebba3bf8ff09da99/regex-2024.9.11-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:7fb89ee5d106e4a7a51bce305ac4efb981536301895f7bdcf93ec92ae0d91c7f", size = 853744 }, - { url = "https://files.pythonhosted.org/packages/96/a7/fba1eae75eb53a704475baf11bd44b3e6ccb95b316955027eb7748f24ef8/regex-2024.9.11-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:a738b937d512b30bf75995c0159c0ddf9eec0775c9d72ac0202076c72f24aa96", size = 855890 }, - { url = "https://files.pythonhosted.org/packages/45/14/d864b2db80a1a3358534392373e8a281d95b28c29c87d8548aed58813910/regex-2024.9.11-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:e28f9faeb14b6f23ac55bfbbfd3643f5c7c18ede093977f1df249f73fd22c7b1", size = 781887 }, - { url = "https://files.pythonhosted.org/packages/4d/a9/bfb29b3de3eb11dc9b412603437023b8e6c02fb4e11311863d9bf62c403a/regex-2024.9.11-cp311-cp311-win32.whl", hash = "sha256:18e707ce6c92d7282dfce370cd205098384b8ee21544e7cb29b8aab955b66fa9", size = 261644 }, - { url = "https://files.pythonhosted.org/packages/c7/ab/1ad2511cf6a208fde57fafe49829cab8ca018128ab0d0b48973d8218634a/regex-2024.9.11-cp311-cp311-win_amd64.whl", hash = "sha256:313ea15e5ff2a8cbbad96ccef6be638393041b0a7863183c2d31e0c6116688cf", size = 274033 }, - { url = "https://files.pythonhosted.org/packages/6e/92/407531450762bed778eedbde04407f68cbd75d13cee96c6f8d6903d9c6c1/regex-2024.9.11-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:b0d0a6c64fcc4ef9c69bd5b3b3626cc3776520a1637d8abaa62b9edc147a58f7", size = 483590 }, - { url = "https://files.pythonhosted.org/packages/8e/a2/048acbc5ae1f615adc6cba36cc45734e679b5f1e4e58c3c77f0ed611d4e2/regex-2024.9.11-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:49b0e06786ea663f933f3710a51e9385ce0cba0ea56b67107fd841a55d56a231", size = 288175 }, - { url = "https://files.pythonhosted.org/packages/8a/ea/909d8620329ab710dfaf7b4adee41242ab7c9b95ea8d838e9bfe76244259/regex-2024.9.11-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5b513b6997a0b2f10e4fd3a1313568e373926e8c252bd76c960f96fd039cd28d", size = 284749 }, - { url = "https://files.pythonhosted.org/packages/ca/fa/521eb683b916389b4975337873e66954e0f6d8f91bd5774164a57b503185/regex-2024.9.11-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ee439691d8c23e76f9802c42a95cfeebf9d47cf4ffd06f18489122dbb0a7ad64", size = 795181 }, - { url = "https://files.pythonhosted.org/packages/28/db/63047feddc3280cc242f9c74f7aeddc6ee662b1835f00046f57d5630c827/regex-2024.9.11-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a8f877c89719d759e52783f7fe6e1c67121076b87b40542966c02de5503ace42", size = 835842 }, - { url = "https://files.pythonhosted.org/packages/e3/94/86adc259ff8ec26edf35fcca7e334566c1805c7493b192cb09679f9c3dee/regex-2024.9.11-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:23b30c62d0f16827f2ae9f2bb87619bc4fba2044911e2e6c2eb1af0161cdb766", size = 823533 }, - { url = "https://files.pythonhosted.org/packages/29/52/84662b6636061277cb857f658518aa7db6672bc6d1a3f503ccd5aefc581e/regex-2024.9.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:85ab7824093d8f10d44330fe1e6493f756f252d145323dd17ab6b48733ff6c0a", size = 797037 }, - { url = "https://files.pythonhosted.org/packages/c3/2a/cd4675dd987e4a7505f0364a958bc41f3b84942de9efaad0ef9a2646681c/regex-2024.9.11-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8dee5b4810a89447151999428fe096977346cf2f29f4d5e29609d2e19e0199c9", size = 784106 }, - { url = "https://files.pythonhosted.org/packages/6f/75/3ea7ec29de0bbf42f21f812f48781d41e627d57a634f3f23947c9a46e303/regex-2024.9.11-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:98eeee2f2e63edae2181c886d7911ce502e1292794f4c5ee71e60e23e8d26b5d", size = 782468 }, - { url = "https://files.pythonhosted.org/packages/d3/67/15519d69b52c252b270e679cb578e22e0c02b8dd4e361f2b04efcc7f2335/regex-2024.9.11-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:57fdd2e0b2694ce6fc2e5ccf189789c3e2962916fb38779d3e3521ff8fe7a822", size = 790324 }, - { url = "https://files.pythonhosted.org/packages/9c/71/eff77d3fe7ba08ab0672920059ec30d63fa7e41aa0fb61c562726e9bd721/regex-2024.9.11-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:d552c78411f60b1fdaafd117a1fca2f02e562e309223b9d44b7de8be451ec5e0", size = 860214 }, - { url = "https://files.pythonhosted.org/packages/81/11/e1bdf84a72372e56f1ea4b833dd583b822a23138a616ace7ab57a0e11556/regex-2024.9.11-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:a0b2b80321c2ed3fcf0385ec9e51a12253c50f146fddb2abbb10f033fe3d049a", size = 859420 }, - { url = "https://files.pythonhosted.org/packages/ea/75/9753e9dcebfa7c3645563ef5c8a58f3a47e799c872165f37c55737dadd3e/regex-2024.9.11-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:18406efb2f5a0e57e3a5881cd9354c1512d3bb4f5c45d96d110a66114d84d23a", size = 787333 }, - { url = "https://files.pythonhosted.org/packages/bc/4e/ba1cbca93141f7416624b3ae63573e785d4bc1834c8be44a8f0747919eca/regex-2024.9.11-cp312-cp312-win32.whl", hash = "sha256:e464b467f1588e2c42d26814231edecbcfe77f5ac414d92cbf4e7b55b2c2a776", size = 262058 }, - { url = "https://files.pythonhosted.org/packages/6e/16/efc5f194778bf43e5888209e5cec4b258005d37c613b67ae137df3b89c53/regex-2024.9.11-cp312-cp312-win_amd64.whl", hash = "sha256:9e8719792ca63c6b8340380352c24dcb8cd7ec49dae36e963742a275dfae6009", size = 273526 }, - { url = "https://files.pythonhosted.org/packages/93/0a/d1c6b9af1ff1e36832fe38d74d5c5bab913f2bdcbbd6bc0e7f3ce8b2f577/regex-2024.9.11-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:c157bb447303070f256e084668b702073db99bbb61d44f85d811025fcf38f784", size = 483376 }, - { url = "https://files.pythonhosted.org/packages/a4/42/5910a050c105d7f750a72dcb49c30220c3ae4e2654e54aaaa0e9bc0584cb/regex-2024.9.11-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4db21ece84dfeefc5d8a3863f101995de646c6cb0536952c321a2650aa202c36", size = 288112 }, - { url = "https://files.pythonhosted.org/packages/8d/56/0c262aff0e9224fa7ffce47b5458d373f4d3e3ff84e99b5ff0cb15e0b5b2/regex-2024.9.11-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:220e92a30b426daf23bb67a7962900ed4613589bab80382be09b48896d211e92", size = 284608 }, - { url = "https://files.pythonhosted.org/packages/b9/54/9fe8f9aec5007bbbbce28ba3d2e3eaca425f95387b7d1e84f0d137d25237/regex-2024.9.11-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eb1ae19e64c14c7ec1995f40bd932448713d3c73509e82d8cd7744dc00e29e86", size = 795337 }, - { url = "https://files.pythonhosted.org/packages/b2/e7/6b2f642c3cded271c4f16cc4daa7231be544d30fe2b168e0223724b49a61/regex-2024.9.11-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f47cd43a5bfa48f86925fe26fbdd0a488ff15b62468abb5d2a1e092a4fb10e85", size = 835848 }, - { url = "https://files.pythonhosted.org/packages/cd/9e/187363bdf5d8c0e4662117b92aa32bf52f8f09620ae93abc7537d96d3311/regex-2024.9.11-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9d4a76b96f398697fe01117093613166e6aa8195d63f1b4ec3f21ab637632963", size = 823503 }, - { url = "https://files.pythonhosted.org/packages/f8/10/601303b8ee93589f879664b0cfd3127949ff32b17f9b6c490fb201106c4d/regex-2024.9.11-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0ea51dcc0835eea2ea31d66456210a4e01a076d820e9039b04ae8d17ac11dee6", size = 797049 }, - { url = "https://files.pythonhosted.org/packages/ef/1c/ea200f61ce9f341763f2717ab4daebe4422d83e9fd4ac5e33435fd3a148d/regex-2024.9.11-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7aaa315101c6567a9a45d2839322c51c8d6e81f67683d529512f5bcfb99c802", size = 784144 }, - { url = "https://files.pythonhosted.org/packages/d8/5c/d2429be49ef3292def7688401d3deb11702c13dcaecdc71d2b407421275b/regex-2024.9.11-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c57d08ad67aba97af57a7263c2d9006d5c404d721c5f7542f077f109ec2a4a29", size = 782483 }, - { url = "https://files.pythonhosted.org/packages/12/d9/cbc30f2ff7164f3b26a7760f87c54bf8b2faed286f60efd80350a51c5b99/regex-2024.9.11-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:f8404bf61298bb6f8224bb9176c1424548ee1181130818fcd2cbffddc768bed8", size = 790320 }, - { url = "https://files.pythonhosted.org/packages/19/1d/43ed03a236313639da5a45e61bc553c8d41e925bcf29b0f8ecff0c2c3f25/regex-2024.9.11-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:dd4490a33eb909ef5078ab20f5f000087afa2a4daa27b4c072ccb3cb3050ad84", size = 860435 }, - { url = "https://files.pythonhosted.org/packages/34/4f/5d04da61c7c56e785058a46349f7285ae3ebc0726c6ea7c5c70600a52233/regex-2024.9.11-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:eee9130eaad130649fd73e5cd92f60e55708952260ede70da64de420cdcad554", size = 859571 }, - { url = "https://files.pythonhosted.org/packages/12/7f/8398c8155a3c70703a8e91c29532558186558e1aea44144b382faa2a6f7a/regex-2024.9.11-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6a2644a93da36c784e546de579ec1806bfd2763ef47babc1b03d765fe560c9f8", size = 787398 }, - { url = "https://files.pythonhosted.org/packages/58/3a/f5903977647a9a7e46d5535e9e96c194304aeeca7501240509bde2f9e17f/regex-2024.9.11-cp313-cp313-win32.whl", hash = "sha256:e997fd30430c57138adc06bba4c7c2968fb13d101e57dd5bb9355bf8ce3fa7e8", size = 262035 }, - { url = "https://files.pythonhosted.org/packages/ff/80/51ba3a4b7482f6011095b3a036e07374f64de180b7d870b704ed22509002/regex-2024.9.11-cp313-cp313-win_amd64.whl", hash = "sha256:042c55879cfeb21a8adacc84ea347721d3d83a159da6acdf1116859e2427c43f", size = 273510 }, +version = "2024.11.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/8e/5f/bd69653fbfb76cf8604468d3b4ec4c403197144c7bfe0e6a5fc9e02a07cb/regex-2024.11.6.tar.gz", hash = "sha256:7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519", size = 399494 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/95/3c/4651f6b130c6842a8f3df82461a8950f923925db8b6961063e82744bddcc/regex-2024.11.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ff590880083d60acc0433f9c3f713c51f7ac6ebb9adf889c79a261ecf541aa91", size = 482674 }, + { url = "https://files.pythonhosted.org/packages/15/51/9f35d12da8434b489c7b7bffc205c474a0a9432a889457026e9bc06a297a/regex-2024.11.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:658f90550f38270639e83ce492f27d2c8d2cd63805c65a13a14d36ca126753f0", size = 287684 }, + { url = "https://files.pythonhosted.org/packages/bd/18/b731f5510d1b8fb63c6b6d3484bfa9a59b84cc578ac8b5172970e05ae07c/regex-2024.11.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:164d8b7b3b4bcb2068b97428060b2a53be050085ef94eca7f240e7947f1b080e", size = 284589 }, + { url = "https://files.pythonhosted.org/packages/78/a2/6dd36e16341ab95e4c6073426561b9bfdeb1a9c9b63ab1b579c2e96cb105/regex-2024.11.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d3660c82f209655a06b587d55e723f0b813d3a7db2e32e5e7dc64ac2a9e86fde", size = 782511 }, + { url = "https://files.pythonhosted.org/packages/1b/2b/323e72d5d2fd8de0d9baa443e1ed70363ed7e7b2fb526f5950c5cb99c364/regex-2024.11.6-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d22326fcdef5e08c154280b71163ced384b428343ae16a5ab2b3354aed12436e", size = 821149 }, + { url = "https://files.pythonhosted.org/packages/90/30/63373b9ea468fbef8a907fd273e5c329b8c9535fee36fc8dba5fecac475d/regex-2024.11.6-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f1ac758ef6aebfc8943560194e9fd0fa18bcb34d89fd8bd2af18183afd8da3a2", size = 809707 }, + { url = "https://files.pythonhosted.org/packages/f2/98/26d3830875b53071f1f0ae6d547f1d98e964dd29ad35cbf94439120bb67a/regex-2024.11.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:997d6a487ff00807ba810e0f8332c18b4eb8d29463cfb7c820dc4b6e7562d0cf", size = 781702 }, + { url = "https://files.pythonhosted.org/packages/87/55/eb2a068334274db86208ab9d5599ffa63631b9f0f67ed70ea7c82a69bbc8/regex-2024.11.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:02a02d2bb04fec86ad61f3ea7f49c015a0681bf76abb9857f945d26159d2968c", size = 771976 }, + { url = "https://files.pythonhosted.org/packages/74/c0/be707bcfe98254d8f9d2cff55d216e946f4ea48ad2fd8cf1428f8c5332ba/regex-2024.11.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f02f93b92358ee3f78660e43b4b0091229260c5d5c408d17d60bf26b6c900e86", size = 697397 }, + { url = "https://files.pythonhosted.org/packages/49/dc/bb45572ceb49e0f6509f7596e4ba7031f6819ecb26bc7610979af5a77f45/regex-2024.11.6-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:06eb1be98df10e81ebaded73fcd51989dcf534e3c753466e4b60c4697a003b67", size = 768726 }, + { url = "https://files.pythonhosted.org/packages/5a/db/f43fd75dc4c0c2d96d0881967897926942e935d700863666f3c844a72ce6/regex-2024.11.6-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:040df6fe1a5504eb0f04f048e6d09cd7c7110fef851d7c567a6b6e09942feb7d", size = 775098 }, + { url = "https://files.pythonhosted.org/packages/99/d7/f94154db29ab5a89d69ff893159b19ada89e76b915c1293e98603d39838c/regex-2024.11.6-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fdabbfc59f2c6edba2a6622c647b716e34e8e3867e0ab975412c5c2f79b82da2", size = 839325 }, + { url = "https://files.pythonhosted.org/packages/f7/17/3cbfab1f23356fbbf07708220ab438a7efa1e0f34195bf857433f79f1788/regex-2024.11.6-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:8447d2d39b5abe381419319f942de20b7ecd60ce86f16a23b0698f22e1b70008", size = 843277 }, + { url = "https://files.pythonhosted.org/packages/7e/f2/48b393b51900456155de3ad001900f94298965e1cad1c772b87f9cfea011/regex-2024.11.6-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:da8f5fc57d1933de22a9e23eec290a0d8a5927a5370d24bda9a6abe50683fe62", size = 773197 }, + { url = "https://files.pythonhosted.org/packages/45/3f/ef9589aba93e084cd3f8471fded352826dcae8489b650d0b9b27bc5bba8a/regex-2024.11.6-cp310-cp310-win32.whl", hash = "sha256:b489578720afb782f6ccf2840920f3a32e31ba28a4b162e13900c3e6bd3f930e", size = 261714 }, + { url = "https://files.pythonhosted.org/packages/42/7e/5f1b92c8468290c465fd50c5318da64319133231415a8aa6ea5ab995a815/regex-2024.11.6-cp310-cp310-win_amd64.whl", hash = "sha256:5071b2093e793357c9d8b2929dfc13ac5f0a6c650559503bb81189d0a3814519", size = 274042 }, + { url = "https://files.pythonhosted.org/packages/58/58/7e4d9493a66c88a7da6d205768119f51af0f684fe7be7bac8328e217a52c/regex-2024.11.6-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:5478c6962ad548b54a591778e93cd7c456a7a29f8eca9c49e4f9a806dcc5d638", size = 482669 }, + { url = "https://files.pythonhosted.org/packages/34/4c/8f8e631fcdc2ff978609eaeef1d6994bf2f028b59d9ac67640ed051f1218/regex-2024.11.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2c89a8cc122b25ce6945f0423dc1352cb9593c68abd19223eebbd4e56612c5b7", size = 287684 }, + { url = "https://files.pythonhosted.org/packages/c5/1b/f0e4d13e6adf866ce9b069e191f303a30ab1277e037037a365c3aad5cc9c/regex-2024.11.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:94d87b689cdd831934fa3ce16cc15cd65748e6d689f5d2b8f4f4df2065c9fa20", size = 284589 }, + { url = "https://files.pythonhosted.org/packages/25/4d/ab21047f446693887f25510887e6820b93f791992994f6498b0318904d4a/regex-2024.11.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1062b39a0a2b75a9c694f7a08e7183a80c63c0d62b301418ffd9c35f55aaa114", size = 792121 }, + { url = "https://files.pythonhosted.org/packages/45/ee/c867e15cd894985cb32b731d89576c41a4642a57850c162490ea34b78c3b/regex-2024.11.6-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:167ed4852351d8a750da48712c3930b031f6efdaa0f22fa1933716bfcd6bf4a3", size = 831275 }, + { url = "https://files.pythonhosted.org/packages/b3/12/b0f480726cf1c60f6536fa5e1c95275a77624f3ac8fdccf79e6727499e28/regex-2024.11.6-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2d548dafee61f06ebdb584080621f3e0c23fff312f0de1afc776e2a2ba99a74f", size = 818257 }, + { url = "https://files.pythonhosted.org/packages/bf/ce/0d0e61429f603bac433910d99ef1a02ce45a8967ffbe3cbee48599e62d88/regex-2024.11.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2a19f302cd1ce5dd01a9099aaa19cae6173306d1302a43b627f62e21cf18ac0", size = 792727 }, + { url = "https://files.pythonhosted.org/packages/e4/c1/243c83c53d4a419c1556f43777ccb552bccdf79d08fda3980e4e77dd9137/regex-2024.11.6-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bec9931dfb61ddd8ef2ebc05646293812cb6b16b60cf7c9511a832b6f1854b55", size = 780667 }, + { url = "https://files.pythonhosted.org/packages/c5/f4/75eb0dd4ce4b37f04928987f1d22547ddaf6c4bae697623c1b05da67a8aa/regex-2024.11.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9714398225f299aa85267fd222f7142fcb5c769e73d7733344efc46f2ef5cf89", size = 776963 }, + { url = "https://files.pythonhosted.org/packages/16/5d/95c568574e630e141a69ff8a254c2f188b4398e813c40d49228c9bbd9875/regex-2024.11.6-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:202eb32e89f60fc147a41e55cb086db2a3f8cb82f9a9a88440dcfc5d37faae8d", size = 784700 }, + { url = "https://files.pythonhosted.org/packages/8e/b5/f8495c7917f15cc6fee1e7f395e324ec3e00ab3c665a7dc9d27562fd5290/regex-2024.11.6-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:4181b814e56078e9b00427ca358ec44333765f5ca1b45597ec7446d3a1ef6e34", size = 848592 }, + { url = "https://files.pythonhosted.org/packages/1c/80/6dd7118e8cb212c3c60b191b932dc57db93fb2e36fb9e0e92f72a5909af9/regex-2024.11.6-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:068376da5a7e4da51968ce4c122a7cd31afaaec4fccc7856c92f63876e57b51d", size = 852929 }, + { url = "https://files.pythonhosted.org/packages/11/9b/5a05d2040297d2d254baf95eeeb6df83554e5e1df03bc1a6687fc4ba1f66/regex-2024.11.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ac10f2c4184420d881a3475fb2c6f4d95d53a8d50209a2500723d831036f7c45", size = 781213 }, + { url = "https://files.pythonhosted.org/packages/26/b7/b14e2440156ab39e0177506c08c18accaf2b8932e39fb092074de733d868/regex-2024.11.6-cp311-cp311-win32.whl", hash = "sha256:c36f9b6f5f8649bb251a5f3f66564438977b7ef8386a52460ae77e6070d309d9", size = 261734 }, + { url = "https://files.pythonhosted.org/packages/80/32/763a6cc01d21fb3819227a1cc3f60fd251c13c37c27a73b8ff4315433a8e/regex-2024.11.6-cp311-cp311-win_amd64.whl", hash = "sha256:02e28184be537f0e75c1f9b2f8847dc51e08e6e171c6bde130b2687e0c33cf60", size = 274052 }, + { url = "https://files.pythonhosted.org/packages/ba/30/9a87ce8336b172cc232a0db89a3af97929d06c11ceaa19d97d84fa90a8f8/regex-2024.11.6-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:52fb28f528778f184f870b7cf8f225f5eef0a8f6e3778529bdd40c7b3920796a", size = 483781 }, + { url = "https://files.pythonhosted.org/packages/01/e8/00008ad4ff4be8b1844786ba6636035f7ef926db5686e4c0f98093612add/regex-2024.11.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:fdd6028445d2460f33136c55eeb1f601ab06d74cb3347132e1c24250187500d9", size = 288455 }, + { url = "https://files.pythonhosted.org/packages/60/85/cebcc0aff603ea0a201667b203f13ba75d9fc8668fab917ac5b2de3967bc/regex-2024.11.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:805e6b60c54bf766b251e94526ebad60b7de0c70f70a4e6210ee2891acb70bf2", size = 284759 }, + { url = "https://files.pythonhosted.org/packages/94/2b/701a4b0585cb05472a4da28ee28fdfe155f3638f5e1ec92306d924e5faf0/regex-2024.11.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b85c2530be953a890eaffde05485238f07029600e8f098cdf1848d414a8b45e4", size = 794976 }, + { url = "https://files.pythonhosted.org/packages/4b/bf/fa87e563bf5fee75db8915f7352e1887b1249126a1be4813837f5dbec965/regex-2024.11.6-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bb26437975da7dc36b7efad18aa9dd4ea569d2357ae6b783bf1118dabd9ea577", size = 833077 }, + { url = "https://files.pythonhosted.org/packages/a1/56/7295e6bad94b047f4d0834e4779491b81216583c00c288252ef625c01d23/regex-2024.11.6-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:abfa5080c374a76a251ba60683242bc17eeb2c9818d0d30117b4486be10c59d3", size = 823160 }, + { url = "https://files.pythonhosted.org/packages/fb/13/e3b075031a738c9598c51cfbc4c7879e26729c53aa9cca59211c44235314/regex-2024.11.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b7fa6606c2881c1db9479b0eaa11ed5dfa11c8d60a474ff0e095099f39d98e", size = 796896 }, + { url = "https://files.pythonhosted.org/packages/24/56/0b3f1b66d592be6efec23a795b37732682520b47c53da5a32c33ed7d84e3/regex-2024.11.6-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0c32f75920cf99fe6b6c539c399a4a128452eaf1af27f39bce8909c9a3fd8cbe", size = 783997 }, + { url = "https://files.pythonhosted.org/packages/f9/a1/eb378dada8b91c0e4c5f08ffb56f25fcae47bf52ad18f9b2f33b83e6d498/regex-2024.11.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:982e6d21414e78e1f51cf595d7f321dcd14de1f2881c5dc6a6e23bbbbd68435e", size = 781725 }, + { url = "https://files.pythonhosted.org/packages/83/f2/033e7dec0cfd6dda93390089864732a3409246ffe8b042e9554afa9bff4e/regex-2024.11.6-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a7c2155f790e2fb448faed6dd241386719802296ec588a8b9051c1f5c481bc29", size = 789481 }, + { url = "https://files.pythonhosted.org/packages/83/23/15d4552ea28990a74e7696780c438aadd73a20318c47e527b47a4a5a596d/regex-2024.11.6-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:149f5008d286636e48cd0b1dd65018548944e495b0265b45e1bffecce1ef7f39", size = 852896 }, + { url = "https://files.pythonhosted.org/packages/e3/39/ed4416bc90deedbfdada2568b2cb0bc1fdb98efe11f5378d9892b2a88f8f/regex-2024.11.6-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:e5364a4502efca094731680e80009632ad6624084aff9a23ce8c8c6820de3e51", size = 860138 }, + { url = "https://files.pythonhosted.org/packages/93/2d/dd56bb76bd8e95bbce684326302f287455b56242a4f9c61f1bc76e28360e/regex-2024.11.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0a86e7eeca091c09e021db8eb72d54751e527fa47b8d5787caf96d9831bd02ad", size = 787692 }, + { url = "https://files.pythonhosted.org/packages/0b/55/31877a249ab7a5156758246b9c59539abbeba22461b7d8adc9e8475ff73e/regex-2024.11.6-cp312-cp312-win32.whl", hash = "sha256:32f9a4c643baad4efa81d549c2aadefaeba12249b2adc5af541759237eee1c54", size = 262135 }, + { url = "https://files.pythonhosted.org/packages/38/ec/ad2d7de49a600cdb8dd78434a1aeffe28b9d6fc42eb36afab4a27ad23384/regex-2024.11.6-cp312-cp312-win_amd64.whl", hash = "sha256:a93c194e2df18f7d264092dc8539b8ffb86b45b899ab976aa15d48214138e81b", size = 273567 }, + { url = "https://files.pythonhosted.org/packages/90/73/bcb0e36614601016552fa9344544a3a2ae1809dc1401b100eab02e772e1f/regex-2024.11.6-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a6ba92c0bcdf96cbf43a12c717eae4bc98325ca3730f6b130ffa2e3c3c723d84", size = 483525 }, + { url = "https://files.pythonhosted.org/packages/0f/3f/f1a082a46b31e25291d830b369b6b0c5576a6f7fb89d3053a354c24b8a83/regex-2024.11.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:525eab0b789891ac3be914d36893bdf972d483fe66551f79d3e27146191a37d4", size = 288324 }, + { url = "https://files.pythonhosted.org/packages/09/c9/4e68181a4a652fb3ef5099e077faf4fd2a694ea6e0f806a7737aff9e758a/regex-2024.11.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:086a27a0b4ca227941700e0b31425e7a28ef1ae8e5e05a33826e17e47fbfdba0", size = 284617 }, + { url = "https://files.pythonhosted.org/packages/fc/fd/37868b75eaf63843165f1d2122ca6cb94bfc0271e4428cf58c0616786dce/regex-2024.11.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bde01f35767c4a7899b7eb6e823b125a64de314a8ee9791367c9a34d56af18d0", size = 795023 }, + { url = "https://files.pythonhosted.org/packages/c4/7c/d4cd9c528502a3dedb5c13c146e7a7a539a3853dc20209c8e75d9ba9d1b2/regex-2024.11.6-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b583904576650166b3d920d2bcce13971f6f9e9a396c673187f49811b2769dc7", size = 833072 }, + { url = "https://files.pythonhosted.org/packages/4f/db/46f563a08f969159c5a0f0e722260568425363bea43bb7ae370becb66a67/regex-2024.11.6-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c4de13f06a0d54fa0d5ab1b7138bfa0d883220965a29616e3ea61b35d5f5fc7", size = 823130 }, + { url = "https://files.pythonhosted.org/packages/db/60/1eeca2074f5b87df394fccaa432ae3fc06c9c9bfa97c5051aed70e6e00c2/regex-2024.11.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3cde6e9f2580eb1665965ce9bf17ff4952f34f5b126beb509fee8f4e994f143c", size = 796857 }, + { url = "https://files.pythonhosted.org/packages/10/db/ac718a08fcee981554d2f7bb8402f1faa7e868c1345c16ab1ebec54b0d7b/regex-2024.11.6-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0d7f453dca13f40a02b79636a339c5b62b670141e63efd511d3f8f73fba162b3", size = 784006 }, + { url = "https://files.pythonhosted.org/packages/c2/41/7da3fe70216cea93144bf12da2b87367590bcf07db97604edeea55dac9ad/regex-2024.11.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:59dfe1ed21aea057a65c6b586afd2a945de04fc7db3de0a6e3ed5397ad491b07", size = 781650 }, + { url = "https://files.pythonhosted.org/packages/a7/d5/880921ee4eec393a4752e6ab9f0fe28009435417c3102fc413f3fe81c4e5/regex-2024.11.6-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:b97c1e0bd37c5cd7902e65f410779d39eeda155800b65fc4d04cc432efa9bc6e", size = 789545 }, + { url = "https://files.pythonhosted.org/packages/dc/96/53770115e507081122beca8899ab7f5ae28ae790bfcc82b5e38976df6a77/regex-2024.11.6-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f9d1e379028e0fc2ae3654bac3cbbef81bf3fd571272a42d56c24007979bafb6", size = 853045 }, + { url = "https://files.pythonhosted.org/packages/31/d3/1372add5251cc2d44b451bd94f43b2ec78e15a6e82bff6a290ef9fd8f00a/regex-2024.11.6-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:13291b39131e2d002a7940fb176e120bec5145f3aeb7621be6534e46251912c4", size = 860182 }, + { url = "https://files.pythonhosted.org/packages/ed/e3/c446a64984ea9f69982ba1a69d4658d5014bc7a0ea468a07e1a1265db6e2/regex-2024.11.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4f51f88c126370dcec4908576c5a627220da6c09d0bff31cfa89f2523843316d", size = 787733 }, + { url = "https://files.pythonhosted.org/packages/2b/f1/e40c8373e3480e4f29f2692bd21b3e05f296d3afebc7e5dcf21b9756ca1c/regex-2024.11.6-cp313-cp313-win32.whl", hash = "sha256:63b13cfd72e9601125027202cad74995ab26921d8cd935c25f09c630436348ff", size = 262122 }, + { url = "https://files.pythonhosted.org/packages/45/94/bc295babb3062a731f52621cdc992d123111282e291abaf23faa413443ea/regex-2024.11.6-cp313-cp313-win_amd64.whl", hash = "sha256:2b3361af3198667e99927da8b84c1b010752fa4b1115ee30beaa332cabc3ef1a", size = 273545 }, ] [[package]] @@ -563,89 +593,101 @@ wheels = [ [[package]] name = "ruamel-yaml" -version = "0.18.6" +version = "0.18.10" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "ruamel-yaml-clib", marker = "python_full_version < '3.13' and platform_python_implementation == 'CPython'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/29/81/4dfc17eb6ebb1aac314a3eb863c1325b907863a1b8b1382cdffcb6ac0ed9/ruamel.yaml-0.18.6.tar.gz", hash = "sha256:8b27e6a217e786c6fbe5634d8f3f11bc63e0f80f6a5890f28863d9c45aac311b", size = 143362 } +sdist = { url = "https://files.pythonhosted.org/packages/ea/46/f44d8be06b85bc7c4d8c95d658be2b68f27711f279bf9dd0612a5e4794f5/ruamel.yaml-0.18.10.tar.gz", hash = "sha256:20c86ab29ac2153f80a428e1254a8adf686d3383df04490514ca3b79a362db58", size = 143447 } wheels = [ - { url = "https://files.pythonhosted.org/packages/73/67/8ece580cc363331d9a53055130f86b096bf16e38156e33b1d3014fffda6b/ruamel.yaml-0.18.6-py3-none-any.whl", hash = "sha256:57b53ba33def16c4f3d807c0ccbc00f8a6081827e81ba2491691b76882d0c636", size = 117761 }, + { url = "https://files.pythonhosted.org/packages/c2/36/dfc1ebc0081e6d39924a2cc53654497f967a084a436bb64402dfce4254d9/ruamel.yaml-0.18.10-py3-none-any.whl", hash = "sha256:30f22513ab2301b3d2b577adc121c6471f28734d3d9728581245f1e76468b4f1", size = 117729 }, ] [[package]] name = "ruamel-yaml-clib" -version = "0.2.8" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/46/ab/bab9eb1566cd16f060b54055dd39cf6a34bfa0240c53a7218c43e974295b/ruamel.yaml.clib-0.2.8.tar.gz", hash = "sha256:beb2e0404003de9a4cab9753a8805a8fe9320ee6673136ed7f04255fe60bb512", size = 213824 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ca/01/37ac131614f71b98e9b148b2d7790662dcee92217d2fb4bac1aa377def33/ruamel.yaml.clib-0.2.8-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b42169467c42b692c19cf539c38d4602069d8c1505e97b86387fcf7afb766e1d", size = 148236 }, - { url = "https://files.pythonhosted.org/packages/61/ee/4874c9fc96010fce85abefdcbe770650c5324288e988d7a48b527a423815/ruamel.yaml.clib-0.2.8-cp310-cp310-macosx_13_0_arm64.whl", hash = "sha256:07238db9cbdf8fc1e9de2489a4f68474e70dffcb32232db7c08fa61ca0c7c462", size = 133996 }, - { url = "https://files.pythonhosted.org/packages/d3/62/c60b034d9a008bbd566eeecf53a5a4c73d191c8de261290db6761802b72d/ruamel.yaml.clib-0.2.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:fff3573c2db359f091e1589c3d7c5fc2f86f5bdb6f24252c2d8e539d4e45f412", size = 526680 }, - { url = "https://files.pythonhosted.org/packages/90/8c/6cdb44f548b29eb6328b9e7e175696336bc856de2ff82e5776f860f03822/ruamel.yaml.clib-0.2.8-cp310-cp310-manylinux_2_24_aarch64.whl", hash = "sha256:aa2267c6a303eb483de8d02db2871afb5c5fc15618d894300b88958f729ad74f", size = 605853 }, - { url = "https://files.pythonhosted.org/packages/88/30/fc45b45d5eaf2ff36cffd215a2f85e9b90ac04e70b97fd4097017abfb567/ruamel.yaml.clib-0.2.8-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:840f0c7f194986a63d2c2465ca63af8ccbbc90ab1c6001b1978f05119b5e7334", size = 655206 }, - { url = "https://files.pythonhosted.org/packages/af/dc/133547f90f744a0c827bac5411d84d4e81da640deb3af1459e38c5f3b6a0/ruamel.yaml.clib-0.2.8-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:024cfe1fc7c7f4e1aff4a81e718109e13409767e4f871443cbff3dba3578203d", size = 689649 }, - { url = "https://files.pythonhosted.org/packages/23/1d/589139191b187a3c750ae8d983c42fd799246d5f0dd84451a0575c9bdbe9/ruamel.yaml.clib-0.2.8-cp310-cp310-win32.whl", hash = "sha256:c69212f63169ec1cfc9bb44723bf2917cbbd8f6191a00ef3410f5a7fe300722d", size = 100044 }, - { url = "https://files.pythonhosted.org/packages/4f/5b/744df20285a75ac4c606452ce9a0fcc42087d122f42294518ded1017697c/ruamel.yaml.clib-0.2.8-cp310-cp310-win_amd64.whl", hash = "sha256:cabddb8d8ead485e255fe80429f833172b4cadf99274db39abc080e068cbcc31", size = 117825 }, - { url = "https://files.pythonhosted.org/packages/b1/15/971b385c098e8d0d170893f5ba558452bb7b776a0c90658b8f4dd0e3382b/ruamel.yaml.clib-0.2.8-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:bef08cd86169d9eafb3ccb0a39edb11d8e25f3dae2b28f5c52fd997521133069", size = 148870 }, - { url = "https://files.pythonhosted.org/packages/01/b0/4ddef56e9f703d7909febc3a421d709a3482cda25826816ec595b73e3847/ruamel.yaml.clib-0.2.8-cp311-cp311-macosx_13_0_arm64.whl", hash = "sha256:b16420e621d26fdfa949a8b4b47ade8810c56002f5389970db4ddda51dbff248", size = 134475 }, - { url = "https://files.pythonhosted.org/packages/a4/f7/22d6b620ed895a05d40802d8281eff924dc6190f682d933d4efff60db3b5/ruamel.yaml.clib-0.2.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:25c515e350e5b739842fc3228d662413ef28f295791af5e5110b543cf0b57d9b", size = 544020 }, - { url = "https://files.pythonhosted.org/packages/7c/e4/0d19d65e340f93df1c47f323d95fa4b256bb28320290f5fddef90837853a/ruamel.yaml.clib-0.2.8-cp311-cp311-manylinux_2_24_aarch64.whl", hash = "sha256:1707814f0d9791df063f8c19bb51b0d1278b8e9a2353abbb676c2f685dee6afe", size = 642643 }, - { url = "https://files.pythonhosted.org/packages/c9/ff/f781eb5e2ae011e586d5426e2086a011cf1e0f59704a6cad1387975c5a62/ruamel.yaml.clib-0.2.8-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:46d378daaac94f454b3a0e3d8d78cafd78a026b1d71443f4966c696b48a6d899", size = 695832 }, - { url = "https://files.pythonhosted.org/packages/e3/41/f62e67ac651358b8f0d60cfb12ab2daf99b1b69eeaa188d0cec809d943a6/ruamel.yaml.clib-0.2.8-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:09b055c05697b38ecacb7ac50bdab2240bfca1a0c4872b0fd309bb07dc9aa3a9", size = 730923 }, - { url = "https://files.pythonhosted.org/packages/9f/f0/19ab8acbf983cd1b37f47d27ceb8b10a738d60d36316a54bad57e0d73fbb/ruamel.yaml.clib-0.2.8-cp311-cp311-win32.whl", hash = "sha256:53a300ed9cea38cf5a2a9b069058137c2ca1ce658a874b79baceb8f892f915a7", size = 99999 }, - { url = "https://files.pythonhosted.org/packages/ec/54/d8a795997921d87224c65d44499ca595a833093fb215b133f920c1062956/ruamel.yaml.clib-0.2.8-cp311-cp311-win_amd64.whl", hash = "sha256:c2a72e9109ea74e511e29032f3b670835f8a59bbdc9ce692c5b4ed91ccf1eedb", size = 118008 }, - { url = "https://files.pythonhosted.org/packages/7a/a2/eb5e9d088cb9d15c24d956944c09dca0a89108ad6e2e913c099ef36e3f0d/ruamel.yaml.clib-0.2.8-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:ebc06178e8821efc9692ea7544aa5644217358490145629914d8020042c24aa1", size = 144636 }, - { url = "https://files.pythonhosted.org/packages/66/98/8de4f22bbfd9135deb3422e96d450c4bc0a57d38c25976119307d2efe0aa/ruamel.yaml.clib-0.2.8-cp312-cp312-macosx_13_0_arm64.whl", hash = "sha256:edaef1c1200c4b4cb914583150dcaa3bc30e592e907c01117c08b13a07255ec2", size = 135684 }, - { url = "https://files.pythonhosted.org/packages/30/d3/5fe978cd01a61c12efd24d65fa68c6f28f28c8073a06cf11db3a854390ca/ruamel.yaml.clib-0.2.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d176b57452ab5b7028ac47e7b3cf644bcfdc8cacfecf7e71759f7f51a59e5c92", size = 734571 }, - { url = "https://files.pythonhosted.org/packages/55/b3/e2531a050758b717c969cbf76c103b75d8a01e11af931b94ba656117fbe9/ruamel.yaml.clib-0.2.8-cp312-cp312-manylinux_2_24_aarch64.whl", hash = "sha256:1dc67314e7e1086c9fdf2680b7b6c2be1c0d8e3a8279f2e993ca2a7545fecf62", size = 643946 }, - { url = "https://files.pythonhosted.org/packages/0d/aa/06db7ca0995b513538402e11280282c615b5ae5f09eb820460d35fb69715/ruamel.yaml.clib-0.2.8-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:3213ece08ea033eb159ac52ae052a4899b56ecc124bb80020d9bbceeb50258e9", size = 692169 }, - { url = "https://files.pythonhosted.org/packages/27/38/4cf4d482b84ecdf51efae6635cc5483a83cf5ca9d9c13e205a750e251696/ruamel.yaml.clib-0.2.8-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:aab7fd643f71d7946f2ee58cc88c9b7bfc97debd71dcc93e03e2d174628e7e2d", size = 740325 }, - { url = "https://files.pythonhosted.org/packages/6f/67/c62c6eea53a4feb042727a3d6c18f50dc99683c2b199c06bd2a9e3db8e22/ruamel.yaml.clib-0.2.8-cp312-cp312-win32.whl", hash = "sha256:5c365d91c88390c8d0a8545df0b5857172824b1c604e867161e6b3d59a827eaa", size = 98639 }, - { url = "https://files.pythonhosted.org/packages/10/d2/52a3d810d0b5b3720725c0504a27b3fced7b6f310fe928f7019d79387bc1/ruamel.yaml.clib-0.2.8-cp312-cp312-win_amd64.whl", hash = "sha256:1758ce7d8e1a29d23de54a16ae867abd370f01b5a69e1a3ba75223eaa3ca1a1b", size = 115305 }, +version = "0.2.12" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/20/84/80203abff8ea4993a87d823a5f632e4d92831ef75d404c9fc78d0176d2b5/ruamel.yaml.clib-0.2.12.tar.gz", hash = "sha256:6c8fbb13ec503f99a91901ab46e0b07ae7941cd527393187039aec586fdfd36f", size = 225315 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/70/57/40a958e863e299f0c74ef32a3bde9f2d1ea8d69669368c0c502a0997f57f/ruamel.yaml.clib-0.2.12-cp310-cp310-macosx_13_0_arm64.whl", hash = "sha256:11f891336688faf5156a36293a9c362bdc7c88f03a8a027c2c1d8e0bcde998e5", size = 131301 }, + { url = "https://files.pythonhosted.org/packages/98/a8/29a3eb437b12b95f50a6bcc3d7d7214301c6c529d8fdc227247fa84162b5/ruamel.yaml.clib-0.2.12-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:a606ef75a60ecf3d924613892cc603b154178ee25abb3055db5062da811fd969", size = 633728 }, + { url = "https://files.pythonhosted.org/packages/35/6d/ae05a87a3ad540259c3ad88d71275cbd1c0f2d30ae04c65dcbfb6dcd4b9f/ruamel.yaml.clib-0.2.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd5415dded15c3822597455bc02bcd66e81ef8b7a48cb71a33628fc9fdde39df", size = 722230 }, + { url = "https://files.pythonhosted.org/packages/7f/b7/20c6f3c0b656fe609675d69bc135c03aac9e3865912444be6339207b6648/ruamel.yaml.clib-0.2.12-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f66efbc1caa63c088dead1c4170d148eabc9b80d95fb75b6c92ac0aad2437d76", size = 686712 }, + { url = "https://files.pythonhosted.org/packages/cd/11/d12dbf683471f888d354dac59593873c2b45feb193c5e3e0f2ebf85e68b9/ruamel.yaml.clib-0.2.12-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:22353049ba4181685023b25b5b51a574bce33e7f51c759371a7422dcae5402a6", size = 663936 }, + { url = "https://files.pythonhosted.org/packages/72/14/4c268f5077db5c83f743ee1daeb236269fa8577133a5cfa49f8b382baf13/ruamel.yaml.clib-0.2.12-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:932205970b9f9991b34f55136be327501903f7c66830e9760a8ffb15b07f05cd", size = 696580 }, + { url = "https://files.pythonhosted.org/packages/30/fc/8cd12f189c6405a4c1cf37bd633aa740a9538c8e40497c231072d0fef5cf/ruamel.yaml.clib-0.2.12-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a52d48f4e7bf9005e8f0a89209bf9a73f7190ddf0489eee5eb51377385f59f2a", size = 663393 }, + { url = "https://files.pythonhosted.org/packages/80/29/c0a017b704aaf3cbf704989785cd9c5d5b8ccec2dae6ac0c53833c84e677/ruamel.yaml.clib-0.2.12-cp310-cp310-win32.whl", hash = "sha256:3eac5a91891ceb88138c113f9db04f3cebdae277f5d44eaa3651a4f573e6a5da", size = 100326 }, + { url = "https://files.pythonhosted.org/packages/3a/65/fa39d74db4e2d0cd252355732d966a460a41cd01c6353b820a0952432839/ruamel.yaml.clib-0.2.12-cp310-cp310-win_amd64.whl", hash = "sha256:ab007f2f5a87bd08ab1499bdf96f3d5c6ad4dcfa364884cb4549aa0154b13a28", size = 118079 }, + { url = "https://files.pythonhosted.org/packages/fb/8f/683c6ad562f558cbc4f7c029abcd9599148c51c54b5ef0f24f2638da9fbb/ruamel.yaml.clib-0.2.12-cp311-cp311-macosx_13_0_arm64.whl", hash = "sha256:4a6679521a58256a90b0d89e03992c15144c5f3858f40d7c18886023d7943db6", size = 132224 }, + { url = "https://files.pythonhosted.org/packages/3c/d2/b79b7d695e2f21da020bd44c782490578f300dd44f0a4c57a92575758a76/ruamel.yaml.clib-0.2.12-cp311-cp311-manylinux2014_aarch64.whl", hash = "sha256:d84318609196d6bd6da0edfa25cedfbabd8dbde5140a0a23af29ad4b8f91fb1e", size = 641480 }, + { url = "https://files.pythonhosted.org/packages/68/6e/264c50ce2a31473a9fdbf4fa66ca9b2b17c7455b31ef585462343818bd6c/ruamel.yaml.clib-0.2.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb43a269eb827806502c7c8efb7ae7e9e9d0573257a46e8e952f4d4caba4f31e", size = 739068 }, + { url = "https://files.pythonhosted.org/packages/86/29/88c2567bc893c84d88b4c48027367c3562ae69121d568e8a3f3a8d363f4d/ruamel.yaml.clib-0.2.12-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:811ea1594b8a0fb466172c384267a4e5e367298af6b228931f273b111f17ef52", size = 703012 }, + { url = "https://files.pythonhosted.org/packages/11/46/879763c619b5470820f0cd6ca97d134771e502776bc2b844d2adb6e37753/ruamel.yaml.clib-0.2.12-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:cf12567a7b565cbf65d438dec6cfbe2917d3c1bdddfce84a9930b7d35ea59642", size = 704352 }, + { url = "https://files.pythonhosted.org/packages/02/80/ece7e6034256a4186bbe50dee28cd032d816974941a6abf6a9d65e4228a7/ruamel.yaml.clib-0.2.12-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7dd5adc8b930b12c8fc5b99e2d535a09889941aa0d0bd06f4749e9a9397c71d2", size = 737344 }, + { url = "https://files.pythonhosted.org/packages/f0/ca/e4106ac7e80efbabdf4bf91d3d32fc424e41418458251712f5672eada9ce/ruamel.yaml.clib-0.2.12-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1492a6051dab8d912fc2adeef0e8c72216b24d57bd896ea607cb90bb0c4981d3", size = 714498 }, + { url = "https://files.pythonhosted.org/packages/67/58/b1f60a1d591b771298ffa0428237afb092c7f29ae23bad93420b1eb10703/ruamel.yaml.clib-0.2.12-cp311-cp311-win32.whl", hash = "sha256:bd0a08f0bab19093c54e18a14a10b4322e1eacc5217056f3c063bd2f59853ce4", size = 100205 }, + { url = "https://files.pythonhosted.org/packages/b4/4f/b52f634c9548a9291a70dfce26ca7ebce388235c93588a1068028ea23fcc/ruamel.yaml.clib-0.2.12-cp311-cp311-win_amd64.whl", hash = "sha256:a274fb2cb086c7a3dea4322ec27f4cb5cc4b6298adb583ab0e211a4682f241eb", size = 118185 }, + { url = "https://files.pythonhosted.org/packages/48/41/e7a405afbdc26af961678474a55373e1b323605a4f5e2ddd4a80ea80f628/ruamel.yaml.clib-0.2.12-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:20b0f8dc160ba83b6dcc0e256846e1a02d044e13f7ea74a3d1d56ede4e48c632", size = 133433 }, + { url = "https://files.pythonhosted.org/packages/ec/b0/b850385604334c2ce90e3ee1013bd911aedf058a934905863a6ea95e9eb4/ruamel.yaml.clib-0.2.12-cp312-cp312-manylinux2014_aarch64.whl", hash = "sha256:943f32bc9dedb3abff9879edc134901df92cfce2c3d5c9348f172f62eb2d771d", size = 647362 }, + { url = "https://files.pythonhosted.org/packages/44/d0/3f68a86e006448fb6c005aee66565b9eb89014a70c491d70c08de597f8e4/ruamel.yaml.clib-0.2.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95c3829bb364fdb8e0332c9931ecf57d9be3519241323c5274bd82f709cebc0c", size = 754118 }, + { url = "https://files.pythonhosted.org/packages/52/a9/d39f3c5ada0a3bb2870d7db41901125dbe2434fa4f12ca8c5b83a42d7c53/ruamel.yaml.clib-0.2.12-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:749c16fcc4a2b09f28843cda5a193e0283e47454b63ec4b81eaa2242f50e4ccd", size = 706497 }, + { url = "https://files.pythonhosted.org/packages/b0/fa/097e38135dadd9ac25aecf2a54be17ddf6e4c23e43d538492a90ab3d71c6/ruamel.yaml.clib-0.2.12-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bf165fef1f223beae7333275156ab2022cffe255dcc51c27f066b4370da81e31", size = 698042 }, + { url = "https://files.pythonhosted.org/packages/ec/d5/a659ca6f503b9379b930f13bc6b130c9f176469b73b9834296822a83a132/ruamel.yaml.clib-0.2.12-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:32621c177bbf782ca5a18ba4d7af0f1082a3f6e517ac2a18b3974d4edf349680", size = 745831 }, + { url = "https://files.pythonhosted.org/packages/db/5d/36619b61ffa2429eeaefaab4f3374666adf36ad8ac6330d855848d7d36fd/ruamel.yaml.clib-0.2.12-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b82a7c94a498853aa0b272fd5bc67f29008da798d4f93a2f9f289feb8426a58d", size = 715692 }, + { url = "https://files.pythonhosted.org/packages/b1/82/85cb92f15a4231c89b95dfe08b09eb6adca929ef7df7e17ab59902b6f589/ruamel.yaml.clib-0.2.12-cp312-cp312-win32.whl", hash = "sha256:e8c4ebfcfd57177b572e2040777b8abc537cdef58a2120e830124946aa9b42c5", size = 98777 }, + { url = "https://files.pythonhosted.org/packages/d7/8f/c3654f6f1ddb75daf3922c3d8fc6005b1ab56671ad56ffb874d908bfa668/ruamel.yaml.clib-0.2.12-cp312-cp312-win_amd64.whl", hash = "sha256:0467c5965282c62203273b838ae77c0d29d7638c8a4e3a1c8bdd3602c10904e4", size = 115523 }, + { url = "https://files.pythonhosted.org/packages/29/00/4864119668d71a5fa45678f380b5923ff410701565821925c69780356ffa/ruamel.yaml.clib-0.2.12-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:4c8c5d82f50bb53986a5e02d1b3092b03622c02c2eb78e29bec33fd9593bae1a", size = 132011 }, + { url = "https://files.pythonhosted.org/packages/7f/5e/212f473a93ae78c669ffa0cb051e3fee1139cb2d385d2ae1653d64281507/ruamel.yaml.clib-0.2.12-cp313-cp313-manylinux2014_aarch64.whl", hash = "sha256:e7e3736715fbf53e9be2a79eb4db68e4ed857017344d697e8b9749444ae57475", size = 642488 }, + { url = "https://files.pythonhosted.org/packages/1f/8f/ecfbe2123ade605c49ef769788f79c38ddb1c8fa81e01f4dbf5cf1a44b16/ruamel.yaml.clib-0.2.12-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b7e75b4965e1d4690e93021adfcecccbca7d61c7bddd8e22406ef2ff20d74ef", size = 745066 }, + { url = "https://files.pythonhosted.org/packages/e2/a9/28f60726d29dfc01b8decdb385de4ced2ced9faeb37a847bd5cf26836815/ruamel.yaml.clib-0.2.12-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96777d473c05ee3e5e3c3e999f5d23c6f4ec5b0c38c098b3a5229085f74236c6", size = 701785 }, + { url = "https://files.pythonhosted.org/packages/84/7e/8e7ec45920daa7f76046578e4f677a3215fe8f18ee30a9cb7627a19d9b4c/ruamel.yaml.clib-0.2.12-cp313-cp313-musllinux_1_1_i686.whl", hash = "sha256:3bc2a80e6420ca8b7d3590791e2dfc709c88ab9152c00eeb511c9875ce5778bf", size = 693017 }, + { url = "https://files.pythonhosted.org/packages/c5/b3/d650eaade4ca225f02a648321e1ab835b9d361c60d51150bac49063b83fa/ruamel.yaml.clib-0.2.12-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:e188d2699864c11c36cdfdada94d781fd5d6b0071cd9c427bceb08ad3d7c70e1", size = 741270 }, + { url = "https://files.pythonhosted.org/packages/87/b8/01c29b924dcbbed75cc45b30c30d565d763b9c4d540545a0eeecffb8f09c/ruamel.yaml.clib-0.2.12-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4f6f3eac23941b32afccc23081e1f50612bdbe4e982012ef4f5797986828cd01", size = 709059 }, + { url = "https://files.pythonhosted.org/packages/30/8c/ed73f047a73638257aa9377ad356bea4d96125b305c34a28766f4445cc0f/ruamel.yaml.clib-0.2.12-cp313-cp313-win32.whl", hash = "sha256:6442cb36270b3afb1b4951f060eccca1ce49f3d087ca1ca4563a6eb479cb3de6", size = 98583 }, + { url = "https://files.pythonhosted.org/packages/b0/85/e8e751d8791564dd333d5d9a4eab0a7a115f7e349595417fd50ecae3395c/ruamel.yaml.clib-0.2.12-cp313-cp313-win_amd64.whl", hash = "sha256:e5b8daf27af0b90da7bb903a876477a9e6d7270be6146906b276605997c7e9a3", size = 115190 }, ] [[package]] name = "ruff" -version = "0.6.7" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/8d/7c/3045a526c57cef4b5ec4d5d154692e31429749a49810a53e785de334c4f6/ruff-0.6.7.tar.gz", hash = "sha256:44e52129d82266fa59b587e2cd74def5637b730a69c4542525dfdecfaae38bd5", size = 3073785 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/22/c4/1c5c636f83f905c537785016e9cdd7a36df53c025a2d07940580ecb37bcf/ruff-0.6.7-py3-none-linux_armv6l.whl", hash = "sha256:08277b217534bfdcc2e1377f7f933e1c7957453e8a79764d004e44c40db923f2", size = 10336748 }, - { url = "https://files.pythonhosted.org/packages/84/d9/aa15a56be7ad796f4d7625362aff588f9fc013bbb7323a63571628a2cf2d/ruff-0.6.7-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:c6707a32e03b791f4448dc0dce24b636cbcdee4dd5607adc24e5ee73fd86c00a", size = 9958833 }, - { url = "https://files.pythonhosted.org/packages/27/25/5dd1c32bfc3ad3136c8ebe84312d1bdd2e6c908ac7f60692ec009b7050a8/ruff-0.6.7-py3-none-macosx_11_0_arm64.whl", hash = "sha256:533d66b7774ef224e7cf91506a7dafcc9e8ec7c059263ec46629e54e7b1f90ab", size = 9633369 }, - { url = "https://files.pythonhosted.org/packages/0e/3e/01b25484f3cb08fe6fddedf1f55f3f3c0af861a5b5f5082fbe60ab4b2596/ruff-0.6.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:17a86aac6f915932d259f7bec79173e356165518859f94649d8c50b81ff087e9", size = 10637415 }, - { url = "https://files.pythonhosted.org/packages/8a/c9/5bb9b849e4777e0f961de43edf95d2af0ab34999a5feee957be096887876/ruff-0.6.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b3f8822defd260ae2460ea3832b24d37d203c3577f48b055590a426a722d50ef", size = 10097389 }, - { url = "https://files.pythonhosted.org/packages/52/cf/e08f1c290c7d848ddfb2ae811f24f445c18e1d3e50e01c38ffa7f5a50494/ruff-0.6.7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9ba4efe5c6dbbb58be58dd83feedb83b5e95c00091bf09987b4baf510fee5c99", size = 10951440 }, - { url = "https://files.pythonhosted.org/packages/a2/2d/ca8aa0da5841913c302d8034c6de0ce56c401c685184d8dd23cfdd0003f9/ruff-0.6.7-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:525201b77f94d2b54868f0cbe5edc018e64c22563da6c5c2e5c107a4e85c1c0d", size = 11708900 }, - { url = "https://files.pythonhosted.org/packages/89/fc/9a83c57baee977c82392e19a328b52cebdaf61601af3d99498e278ef5104/ruff-0.6.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8854450839f339e1049fdbe15d875384242b8e85d5c6947bb2faad33c651020b", size = 11258892 }, - { url = "https://files.pythonhosted.org/packages/d3/a3/254cc7afef702c68ae9079290c2a1477ae0e81478589baf745026d8a4eb5/ruff-0.6.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2f0b62056246234d59cbf2ea66e84812dc9ec4540518e37553513392c171cb18", size = 12367932 }, - { url = "https://files.pythonhosted.org/packages/9f/55/53f10c1bd8c3b2ae79aed18e62b22c6346f9296aa0ec80489b8442bd06a9/ruff-0.6.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b1462fa56c832dc0cea5b4041cfc9c97813505d11cce74ebc6d1aae068de36b", size = 10838629 }, - { url = "https://files.pythonhosted.org/packages/84/72/fb335c2b25432c63d15383ecbd7bfc1915e68cdf8d086a08042052144255/ruff-0.6.7-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:02b083770e4cdb1495ed313f5694c62808e71764ec6ee5db84eedd82fd32d8f5", size = 10648824 }, - { url = "https://files.pythonhosted.org/packages/92/a8/d57e135a8ad99b6a0c6e2a5c590bcacdd57f44340174f4409c3893368610/ruff-0.6.7-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:0c05fd37013de36dfa883a3854fae57b3113aaa8abf5dea79202675991d48624", size = 10174368 }, - { url = "https://files.pythonhosted.org/packages/a7/6f/1a30a6e81dcf2fa9ff3f7011eb87fe76c12a3c6bba74db6a1977d763de1f/ruff-0.6.7-py3-none-musllinux_1_2_i686.whl", hash = "sha256:f49c9caa28d9bbfac4a637ae10327b3db00f47d038f3fbb2195c4d682e925b14", size = 10514383 }, - { url = "https://files.pythonhosted.org/packages/0b/25/df6f2575bc9fe43a6dedfd8dee12896f09a94303e2c828d5f85856bb69a0/ruff-0.6.7-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:a0e1655868164e114ba43a908fd2d64a271a23660195017c17691fb6355d59bb", size = 10902340 }, - { url = "https://files.pythonhosted.org/packages/68/62/f2c1031e2fb7b94f9bf0603744e73db4ef90081b0eb1b9639a6feefd52ea/ruff-0.6.7-py3-none-win32.whl", hash = "sha256:a939ca435b49f6966a7dd64b765c9df16f1faed0ca3b6f16acdf7731969deb35", size = 8448033 }, - { url = "https://files.pythonhosted.org/packages/97/80/193d1604a3f7d75eb1b2a7ce6bf0fdbdbc136889a65caacea6ffb29501b1/ruff-0.6.7-py3-none-win_amd64.whl", hash = "sha256:590445eec5653f36248584579c06252ad2e110a5d1f32db5420de35fb0e1c977", size = 9273543 }, - { url = "https://files.pythonhosted.org/packages/8e/a8/4abb5a9f58f51e4b1ea386be5ab2e547035bc1ee57200d1eca2f8909a33e/ruff-0.6.7-py3-none-win_arm64.whl", hash = "sha256:b28f0d5e2f771c1fe3c7a45d3f53916fc74a480698c4b5731f0bea61e52137c8", size = 8618044 }, +version = "0.9.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c0/17/529e78f49fc6f8076f50d985edd9a2cf011d1dbadb1cdeacc1d12afc1d26/ruff-0.9.4.tar.gz", hash = "sha256:6907ee3529244bb0ed066683e075f09285b38dd5b4039370df6ff06041ca19e7", size = 3599458 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b6/f8/3fafb7804d82e0699a122101b5bee5f0d6e17c3a806dcbc527bb7d3f5b7a/ruff-0.9.4-py3-none-linux_armv6l.whl", hash = "sha256:64e73d25b954f71ff100bb70f39f1ee09e880728efb4250c632ceed4e4cdf706", size = 11668400 }, + { url = "https://files.pythonhosted.org/packages/2e/a6/2efa772d335da48a70ab2c6bb41a096c8517ca43c086ea672d51079e3d1f/ruff-0.9.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6ce6743ed64d9afab4fafeaea70d3631b4d4b28b592db21a5c2d1f0ef52934bf", size = 11628395 }, + { url = "https://files.pythonhosted.org/packages/dc/d7/cd822437561082f1c9d7225cc0d0fbb4bad117ad7ac3c41cd5d7f0fa948c/ruff-0.9.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:54499fb08408e32b57360f6f9de7157a5fec24ad79cb3f42ef2c3f3f728dfe2b", size = 11090052 }, + { url = "https://files.pythonhosted.org/packages/9e/67/3660d58e893d470abb9a13f679223368ff1684a4ef40f254a0157f51b448/ruff-0.9.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:37c892540108314a6f01f105040b5106aeb829fa5fb0561d2dcaf71485021137", size = 11882221 }, + { url = "https://files.pythonhosted.org/packages/79/d1/757559995c8ba5f14dfec4459ef2dd3fcea82ac43bc4e7c7bf47484180c0/ruff-0.9.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:de9edf2ce4b9ddf43fd93e20ef635a900e25f622f87ed6e3047a664d0e8f810e", size = 11424862 }, + { url = "https://files.pythonhosted.org/packages/c0/96/7915a7c6877bb734caa6a2af424045baf6419f685632469643dbd8eb2958/ruff-0.9.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:87c90c32357c74f11deb7fbb065126d91771b207bf9bfaaee01277ca59b574ec", size = 12626735 }, + { url = "https://files.pythonhosted.org/packages/0e/cc/dadb9b35473d7cb17c7ffe4737b4377aeec519a446ee8514123ff4a26091/ruff-0.9.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:56acd6c694da3695a7461cc55775f3a409c3815ac467279dfa126061d84b314b", size = 13255976 }, + { url = "https://files.pythonhosted.org/packages/5f/c3/ad2dd59d3cabbc12df308cced780f9c14367f0321e7800ca0fe52849da4c/ruff-0.9.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e0c93e7d47ed951b9394cf352d6695b31498e68fd5782d6cbc282425655f687a", size = 12752262 }, + { url = "https://files.pythonhosted.org/packages/c7/17/5f1971e54bd71604da6788efd84d66d789362b1105e17e5ccc53bba0289b/ruff-0.9.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1d4c8772670aecf037d1bf7a07c39106574d143b26cfe5ed1787d2f31e800214", size = 14401648 }, + { url = "https://files.pythonhosted.org/packages/30/24/6200b13ea611b83260501b6955b764bb320e23b2b75884c60ee7d3f0b68e/ruff-0.9.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfc5f1d7afeda8d5d37660eeca6d389b142d7f2b5a1ab659d9214ebd0e025231", size = 12414702 }, + { url = "https://files.pythonhosted.org/packages/34/cb/f5d50d0c4ecdcc7670e348bd0b11878154bc4617f3fdd1e8ad5297c0d0ba/ruff-0.9.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:faa935fc00ae854d8b638c16a5f1ce881bc3f67446957dd6f2af440a5fc8526b", size = 11859608 }, + { url = "https://files.pythonhosted.org/packages/d6/f4/9c8499ae8426da48363bbb78d081b817b0f64a9305f9b7f87eab2a8fb2c1/ruff-0.9.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a6c634fc6f5a0ceae1ab3e13c58183978185d131a29c425e4eaa9f40afe1e6d6", size = 11485702 }, + { url = "https://files.pythonhosted.org/packages/18/59/30490e483e804ccaa8147dd78c52e44ff96e1c30b5a95d69a63163cdb15b/ruff-0.9.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:433dedf6ddfdec7f1ac7575ec1eb9844fa60c4c8c2f8887a070672b8d353d34c", size = 12067782 }, + { url = "https://files.pythonhosted.org/packages/3d/8c/893fa9551760b2f8eb2a351b603e96f15af167ceaf27e27ad873570bc04c/ruff-0.9.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:d612dbd0f3a919a8cc1d12037168bfa536862066808960e0cc901404b77968f0", size = 12483087 }, + { url = "https://files.pythonhosted.org/packages/23/15/f6751c07c21ca10e3f4a51ea495ca975ad936d780c347d9808bcedbd7182/ruff-0.9.4-py3-none-win32.whl", hash = "sha256:db1192ddda2200671f9ef61d9597fcef89d934f5d1705e571a93a67fb13a4402", size = 9852302 }, + { url = "https://files.pythonhosted.org/packages/12/41/2d2d2c6a72e62566f730e49254f602dfed23019c33b5b21ea8f8917315a1/ruff-0.9.4-py3-none-win_amd64.whl", hash = "sha256:05bebf4cdbe3ef75430d26c375773978950bbf4ee3c95ccb5448940dc092408e", size = 10850051 }, + { url = "https://files.pythonhosted.org/packages/c6/e6/3d6ec3bc3d254e7f005c543a661a41c3e788976d0e52a1ada195bd664344/ruff-0.9.4-py3-none-win_arm64.whl", hash = "sha256:585792f1e81509e38ac5123492f8875fbc36f3ede8185af0a26df348e5154f41", size = 10078251 }, ] [[package]] name = "setuptools" -version = "75.1.0" +version = "75.8.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/27/b8/f21073fde99492b33ca357876430822e4800cdf522011f18041351dfa74b/setuptools-75.1.0.tar.gz", hash = "sha256:d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538", size = 1348057 } +sdist = { url = "https://files.pythonhosted.org/packages/92/ec/089608b791d210aec4e7f97488e67ab0d33add3efccb83a056cbafe3a2a6/setuptools-75.8.0.tar.gz", hash = "sha256:c5afc8f407c626b8313a86e10311dd3f661c6cd9c09d4bf8c15c0e11f9f2b0e6", size = 1343222 } wheels = [ - { url = "https://files.pythonhosted.org/packages/ff/ae/f19306b5a221f6a436d8f2238d5b80925004093fa3edea59835b514d9057/setuptools-75.1.0-py3-none-any.whl", hash = "sha256:35ab7fd3bcd95e6b7fd704e4a1539513edad446c097797f2985e0e4b960772f2", size = 1248506 }, + { url = "https://files.pythonhosted.org/packages/69/8a/b9dc7678803429e4a3bc9ba462fa3dd9066824d3c607490235c6a796be5a/setuptools-75.8.0-py3-none-any.whl", hash = "sha256:e3982f444617239225d675215d51f6ba05f845d4eec313da4418fdbb56fb27e3", size = 1228782 }, ] [[package]] name = "six" -version = "1.16.0" +version = "1.17.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", size = 34041 } +sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031 } wheels = [ - { url = "https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254", size = 11053 }, + { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050 }, ] [[package]] @@ -659,7 +701,7 @@ wheels = [ [[package]] name = "taskipy" -version = "1.13.0" +version = "1.14.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "colorama" }, @@ -667,57 +709,96 @@ dependencies = [ { name = "psutil" }, { name = "tomli", marker = "python_full_version < '4.0'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/58/c4/04a9e02cd9bdf0389a975523ef39879125b01a58b8ec73ffd8a240cbea90/taskipy-1.13.0.tar.gz", hash = "sha256:2b52f0257958fed151f1340f7de93fcf0848f7a358ad62ba05c31c2ca04f89fe", size = 14500 } +sdist = { url = "https://files.pythonhosted.org/packages/c7/44/572261df3db9c6c3332f8618fafeb07a578fd18b06673c73f000f3586749/taskipy-1.14.1.tar.gz", hash = "sha256:410fbcf89692dfd4b9f39c2b49e1750b0a7b81affd0e2d7ea8c35f9d6a4774ed", size = 14475 } wheels = [ - { url = "https://files.pythonhosted.org/packages/c0/61/0db50db6240ad3e6b12621a5f4fda5d0e6d3ec6cb40ef0ef779e58ad327e/taskipy-1.13.0-py3-none-any.whl", hash = "sha256:56f42b7e508d9aed2c7b6365f8d3dab62dbd0c768c1ab606c819da4fc38421f7", size = 12976 }, + { url = "https://files.pythonhosted.org/packages/55/97/4e4cfb1391c81e926bebe3d68d5231b5dbc3bb41c6ba48349e68a881462d/taskipy-1.14.1-py3-none-any.whl", hash = "sha256:6e361520f29a0fd2159848e953599f9c75b1d0b047461e4965069caeb94908f1", size = 13052 }, ] [[package]] name = "tomli" -version = "2.0.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/c0/3f/d7af728f075fb08564c5949a9c95e44352e23dee646869fa104a3b2060a3/tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f", size = 15164 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/97/75/10a9ebee3fd790d20926a90a2547f0bf78f371b2f13aa822c759680ca7b9/tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc", size = 12757 }, +version = "2.2.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/18/87/302344fed471e44a87289cf4967697d07e532f2421fdaf868a303cbae4ff/tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff", size = 17175 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/43/ca/75707e6efa2b37c77dadb324ae7d9571cb424e61ea73fad7c56c2d14527f/tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249", size = 131077 }, + { url = "https://files.pythonhosted.org/packages/c7/16/51ae563a8615d472fdbffc43a3f3d46588c264ac4f024f63f01283becfbb/tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6", size = 123429 }, + { url = "https://files.pythonhosted.org/packages/f1/dd/4f6cd1e7b160041db83c694abc78e100473c15d54620083dbd5aae7b990e/tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a", size = 226067 }, + { url = "https://files.pythonhosted.org/packages/a9/6b/c54ede5dc70d648cc6361eaf429304b02f2871a345bbdd51e993d6cdf550/tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee", size = 236030 }, + { url = "https://files.pythonhosted.org/packages/1f/47/999514fa49cfaf7a92c805a86c3c43f4215621855d151b61c602abb38091/tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e", size = 240898 }, + { url = "https://files.pythonhosted.org/packages/73/41/0a01279a7ae09ee1573b423318e7934674ce06eb33f50936655071d81a24/tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4", size = 229894 }, + { url = "https://files.pythonhosted.org/packages/55/18/5d8bc5b0a0362311ce4d18830a5d28943667599a60d20118074ea1b01bb7/tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106", size = 245319 }, + { url = "https://files.pythonhosted.org/packages/92/a3/7ade0576d17f3cdf5ff44d61390d4b3febb8a9fc2b480c75c47ea048c646/tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8", size = 238273 }, + { url = "https://files.pythonhosted.org/packages/72/6f/fa64ef058ac1446a1e51110c375339b3ec6be245af9d14c87c4a6412dd32/tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff", size = 98310 }, + { url = "https://files.pythonhosted.org/packages/6a/1c/4a2dcde4a51b81be3530565e92eda625d94dafb46dbeb15069df4caffc34/tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b", size = 108309 }, + { url = "https://files.pythonhosted.org/packages/52/e1/f8af4c2fcde17500422858155aeb0d7e93477a0d59a98e56cbfe75070fd0/tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea", size = 132762 }, + { url = "https://files.pythonhosted.org/packages/03/b8/152c68bb84fc00396b83e7bbddd5ec0bd3dd409db4195e2a9b3e398ad2e3/tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8", size = 123453 }, + { url = "https://files.pythonhosted.org/packages/c8/d6/fc9267af9166f79ac528ff7e8c55c8181ded34eb4b0e93daa767b8841573/tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192", size = 233486 }, + { url = "https://files.pythonhosted.org/packages/5c/51/51c3f2884d7bab89af25f678447ea7d297b53b5a3b5730a7cb2ef6069f07/tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222", size = 242349 }, + { url = "https://files.pythonhosted.org/packages/ab/df/bfa89627d13a5cc22402e441e8a931ef2108403db390ff3345c05253935e/tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77", size = 252159 }, + { url = "https://files.pythonhosted.org/packages/9e/6e/fa2b916dced65763a5168c6ccb91066f7639bdc88b48adda990db10c8c0b/tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6", size = 237243 }, + { url = "https://files.pythonhosted.org/packages/b4/04/885d3b1f650e1153cbb93a6a9782c58a972b94ea4483ae4ac5cedd5e4a09/tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd", size = 259645 }, + { url = "https://files.pythonhosted.org/packages/9c/de/6b432d66e986e501586da298e28ebeefd3edc2c780f3ad73d22566034239/tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e", size = 244584 }, + { url = "https://files.pythonhosted.org/packages/1c/9a/47c0449b98e6e7d1be6cbac02f93dd79003234ddc4aaab6ba07a9a7482e2/tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98", size = 98875 }, + { url = "https://files.pythonhosted.org/packages/ef/60/9b9638f081c6f1261e2688bd487625cd1e660d0a85bd469e91d8db969734/tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4", size = 109418 }, + { url = "https://files.pythonhosted.org/packages/04/90/2ee5f2e0362cb8a0b6499dc44f4d7d48f8fff06d28ba46e6f1eaa61a1388/tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7", size = 132708 }, + { url = "https://files.pythonhosted.org/packages/c0/ec/46b4108816de6b385141f082ba99e315501ccd0a2ea23db4a100dd3990ea/tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c", size = 123582 }, + { url = "https://files.pythonhosted.org/packages/a0/bd/b470466d0137b37b68d24556c38a0cc819e8febe392d5b199dcd7f578365/tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13", size = 232543 }, + { url = "https://files.pythonhosted.org/packages/d9/e5/82e80ff3b751373f7cead2815bcbe2d51c895b3c990686741a8e56ec42ab/tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281", size = 241691 }, + { url = "https://files.pythonhosted.org/packages/05/7e/2a110bc2713557d6a1bfb06af23dd01e7dde52b6ee7dadc589868f9abfac/tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272", size = 251170 }, + { url = "https://files.pythonhosted.org/packages/64/7b/22d713946efe00e0adbcdfd6d1aa119ae03fd0b60ebed51ebb3fa9f5a2e5/tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140", size = 236530 }, + { url = "https://files.pythonhosted.org/packages/38/31/3a76f67da4b0cf37b742ca76beaf819dca0ebef26d78fc794a576e08accf/tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2", size = 258666 }, + { url = "https://files.pythonhosted.org/packages/07/10/5af1293da642aded87e8a988753945d0cf7e00a9452d3911dd3bb354c9e2/tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744", size = 243954 }, + { url = "https://files.pythonhosted.org/packages/5b/b9/1ed31d167be802da0fc95020d04cd27b7d7065cc6fbefdd2f9186f60d7bd/tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec", size = 98724 }, + { url = "https://files.pythonhosted.org/packages/c7/32/b0963458706accd9afcfeb867c0f9175a741bf7b19cd424230714d722198/tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69", size = 109383 }, + { url = "https://files.pythonhosted.org/packages/6e/c2/61d3e0f47e2b74ef40a68b9e6ad5984f6241a942f7cd3bbfbdbd03861ea9/tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc", size = 14257 }, +] + +[[package]] +name = "typing-extensions" +version = "4.12.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8", size = 85321 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", size = 37438 }, ] [[package]] name = "urllib3" -version = "2.2.3" +version = "2.3.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9", size = 300677 } +sdist = { url = "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d", size = 307268 } wheels = [ - { url = "https://files.pythonhosted.org/packages/ce/d9/5f4c13cecde62396b0d3fe530a50ccea91e7dfc1ccf0e09c228841bb5ba8/urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac", size = 126338 }, + { url = "https://files.pythonhosted.org/packages/c8/19/4ec628951a74043532ca2cf5d97b7b14863931476d117c471e8e2b1eb39f/urllib3-2.3.0-py3-none-any.whl", hash = "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df", size = 128369 }, ] [[package]] name = "watchdog" -version = "5.0.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/cd/5e/95dcd86d8339fcf76385f7fad5e49cbfd989b6c6199127121c9587febc65/watchdog-5.0.2.tar.gz", hash = "sha256:dcebf7e475001d2cdeb020be630dc5b687e9acdd60d16fea6bb4508e7b94cf76", size = 127779 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/71/19/c5b0f64269d396dbc9f06d4b7fa8400c0282143640ebc8cbad84553ee4ee/watchdog-5.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d961f4123bb3c447d9fcdcb67e1530c366f10ab3a0c7d1c0c9943050936d4877", size = 96274 }, - { url = "https://files.pythonhosted.org/packages/5e/5e/62adbcf4d96a533d71dbd951a3c101019989c8ce8796e267d6509ba12138/watchdog-5.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72990192cb63872c47d5e5fefe230a401b87fd59d257ee577d61c9e5564c62e5", size = 88275 }, - { url = "https://files.pythonhosted.org/packages/d0/16/5b36358158b7debcae7b62fe9b6d9874c60e445b37b1e51b7c5d00c6572b/watchdog-5.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6bec703ad90b35a848e05e1b40bf0050da7ca28ead7ac4be724ae5ac2653a1a0", size = 88911 }, - { url = "https://files.pythonhosted.org/packages/80/52/51046f428e813270cd959bee9d2343f103c10adf10e957f69d6710a38ab8/watchdog-5.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:dae7a1879918f6544201d33666909b040a46421054a50e0f773e0d870ed7438d", size = 96276 }, - { url = "https://files.pythonhosted.org/packages/b3/8e/0e5671f3950fd2049bbeb8c965cb53e143bfd72869e5e4c60dda572121cd/watchdog-5.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c4a440f725f3b99133de610bfec93d570b13826f89616377715b9cd60424db6e", size = 88269 }, - { url = "https://files.pythonhosted.org/packages/b5/34/9c436ec85f7234b468e49380f57cc784b4e22f058febe17221f25ce85c4b/watchdog-5.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f8b2918c19e0d48f5f20df458c84692e2a054f02d9df25e6c3c930063eca64c1", size = 88914 }, - { url = "https://files.pythonhosted.org/packages/ef/41/fe19a56aa8ea7e453311f2b4fd2bfb172d21bd72ef6ae0fd40c304c74edf/watchdog-5.0.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:aa9cd6e24126d4afb3752a3e70fce39f92d0e1a58a236ddf6ee823ff7dba28ee", size = 96365 }, - { url = "https://files.pythonhosted.org/packages/cc/02/86d631595ec1c5678e23e9359741d2dea460be0712b41a243281b37e90ba/watchdog-5.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f627c5bf5759fdd90195b0c0431f99cff4867d212a67b384442c51136a098ed7", size = 88330 }, - { url = "https://files.pythonhosted.org/packages/d8/a7/5c57f05def91ff11528f0aa0d4c23efc99fa064ec69c262fedc6c9885697/watchdog-5.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d7594a6d32cda2b49df3fd9abf9b37c8d2f3eab5df45c24056b4a671ac661619", size = 88935 }, - { url = "https://files.pythonhosted.org/packages/80/1a/a681c0093eea33b18a7348b398302628ab96647f59eaf06a5a047e8a1f39/watchdog-5.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba32efcccfe2c58f4d01115440d1672b4eb26cdd6fc5b5818f1fb41f7c3e1889", size = 96362 }, - { url = "https://files.pythonhosted.org/packages/c4/aa/0c827bd35716d91b5a4a2a6c5ca7638d936e6055dec8ce85414383ab887f/watchdog-5.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:963f7c4c91e3f51c998eeff1b3fb24a52a8a34da4f956e470f4b068bb47b78ee", size = 88336 }, - { url = "https://files.pythonhosted.org/packages/6e/ba/da13d47dacc84bfab52310e74f954eb440c5cdee11ff8786228f17343a3d/watchdog-5.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:8c47150aa12f775e22efff1eee9f0f6beee542a7aa1a985c271b1997d340184f", size = 88938 }, - { url = "https://files.pythonhosted.org/packages/23/f1/dafce06a12fe2d61859aaceb81fbe3f3ed7907b81fcfa784416b1196dcfe/watchdog-5.0.2-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:fb223456db6e5f7bd9bbd5cd969f05aae82ae21acc00643b60d81c770abd402b", size = 87795 }, - { url = "https://files.pythonhosted.org/packages/7c/63/39a71aa9cea895885b3e644b573f1d05e00e368211efe76b9a63c7623512/watchdog-5.0.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:9814adb768c23727a27792c77812cf4e2fd9853cd280eafa2bcfa62a99e8bd6e", size = 88269 }, - { url = "https://files.pythonhosted.org/packages/5b/cb/c13dfc4714547c4a63f27a50d5d0bbda655ef06d93595c016822ff771032/watchdog-5.0.2-py3-none-manylinux2014_aarch64.whl", hash = "sha256:5597c051587f8757798216f2485e85eac583c3b343e9aa09127a3a6f82c65ee8", size = 78960 }, - { url = "https://files.pythonhosted.org/packages/cb/ed/78acaa8e95e193a46925f7beeed45c29569d0ee572216df622bb0908abf3/watchdog-5.0.2-py3-none-manylinux2014_armv7l.whl", hash = "sha256:53ed1bf71fcb8475dd0ef4912ab139c294c87b903724b6f4a8bd98e026862e6d", size = 78960 }, - { url = "https://files.pythonhosted.org/packages/2f/54/30bde6279d2f77e6c2838a89e9975038bba4adbfb029f9b8e01cf2813199/watchdog-5.0.2-py3-none-manylinux2014_i686.whl", hash = "sha256:29e4a2607bd407d9552c502d38b45a05ec26a8e40cc7e94db9bb48f861fa5abc", size = 78958 }, - { url = "https://files.pythonhosted.org/packages/f4/db/886241c6d02f165fbf633b633dc5ceddc6c145fec3704828606743ddb663/watchdog-5.0.2-py3-none-manylinux2014_ppc64.whl", hash = "sha256:b6dc8f1d770a8280997e4beae7b9a75a33b268c59e033e72c8a10990097e5fde", size = 78957 }, - { url = "https://files.pythonhosted.org/packages/a9/74/c255a2146280adcb2d1b5ccb7580e71114b253f356a6c4ea748b0eb7a7b5/watchdog-5.0.2-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:d2ab34adc9bf1489452965cdb16a924e97d4452fcf88a50b21859068b50b5c3b", size = 78960 }, - { url = "https://files.pythonhosted.org/packages/8a/dc/4bdc31a35ffce526280c5a29b64b939624761f47e3fcdac34808589d0845/watchdog-5.0.2-py3-none-manylinux2014_s390x.whl", hash = "sha256:7d1aa7e4bb0f0c65a1a91ba37c10e19dabf7eaaa282c5787e51371f090748f4b", size = 78959 }, - { url = "https://files.pythonhosted.org/packages/9d/53/e71b01aa5737a21664b731de5f91c5b0721ff64d237e43efc56a99254fa1/watchdog-5.0.2-py3-none-manylinux2014_x86_64.whl", hash = "sha256:726eef8f8c634ac6584f86c9c53353a010d9f311f6c15a034f3800a7a891d941", size = 78959 }, - { url = "https://files.pythonhosted.org/packages/5d/0e/c37862900200436a554a4c411645f29887fe3fb4d4e465fbedcf1e0e383a/watchdog-5.0.2-py3-none-win32.whl", hash = "sha256:bda40c57115684d0216556671875e008279dea2dc00fcd3dde126ac8e0d7a2fb", size = 78947 }, - { url = "https://files.pythonhosted.org/packages/8f/ab/f1a3791be609e18596ce6a52c00274f1b244340b87379eb78c4df15f6b2b/watchdog-5.0.2-py3-none-win_amd64.whl", hash = "sha256:d010be060c996db725fbce7e3ef14687cdcc76f4ca0e4339a68cc4532c382a73", size = 78950 }, - { url = "https://files.pythonhosted.org/packages/53/99/f5065334d157518ec8c707aa790c93d639fac582be4f7caec5db8c6fa089/watchdog-5.0.2-py3-none-win_ia64.whl", hash = "sha256:3960136b2b619510569b90f0cd96408591d6c251a75c97690f4553ca88889769", size = 78948 }, +version = "6.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/db/7d/7f3d619e951c88ed75c6037b246ddcf2d322812ee8ea189be89511721d54/watchdog-6.0.0.tar.gz", hash = "sha256:9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282", size = 131220 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0c/56/90994d789c61df619bfc5ce2ecdabd5eeff564e1eb47512bd01b5e019569/watchdog-6.0.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d1cdb490583ebd691c012b3d6dae011000fe42edb7a82ece80965b42abd61f26", size = 96390 }, + { url = "https://files.pythonhosted.org/packages/55/46/9a67ee697342ddf3c6daa97e3a587a56d6c4052f881ed926a849fcf7371c/watchdog-6.0.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bc64ab3bdb6a04d69d4023b29422170b74681784ffb9463ed4870cf2f3e66112", size = 88389 }, + { url = "https://files.pythonhosted.org/packages/44/65/91b0985747c52064d8701e1075eb96f8c40a79df889e59a399453adfb882/watchdog-6.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c897ac1b55c5a1461e16dae288d22bb2e412ba9807df8397a635d88f671d36c3", size = 89020 }, + { url = "https://files.pythonhosted.org/packages/e0/24/d9be5cd6642a6aa68352ded4b4b10fb0d7889cb7f45814fb92cecd35f101/watchdog-6.0.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6eb11feb5a0d452ee41f824e271ca311a09e250441c262ca2fd7ebcf2461a06c", size = 96393 }, + { url = "https://files.pythonhosted.org/packages/63/7a/6013b0d8dbc56adca7fdd4f0beed381c59f6752341b12fa0886fa7afc78b/watchdog-6.0.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ef810fbf7b781a5a593894e4f439773830bdecb885e6880d957d5b9382a960d2", size = 88392 }, + { url = "https://files.pythonhosted.org/packages/d1/40/b75381494851556de56281e053700e46bff5b37bf4c7267e858640af5a7f/watchdog-6.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:afd0fe1b2270917c5e23c2a65ce50c2a4abb63daafb0d419fde368e272a76b7c", size = 89019 }, + { url = "https://files.pythonhosted.org/packages/39/ea/3930d07dafc9e286ed356a679aa02d777c06e9bfd1164fa7c19c288a5483/watchdog-6.0.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:bdd4e6f14b8b18c334febb9c4425a878a2ac20efd1e0b231978e7b150f92a948", size = 96471 }, + { url = "https://files.pythonhosted.org/packages/12/87/48361531f70b1f87928b045df868a9fd4e253d9ae087fa4cf3f7113be363/watchdog-6.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c7c15dda13c4eb00d6fb6fc508b3c0ed88b9d5d374056b239c4ad1611125c860", size = 88449 }, + { url = "https://files.pythonhosted.org/packages/5b/7e/8f322f5e600812e6f9a31b75d242631068ca8f4ef0582dd3ae6e72daecc8/watchdog-6.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6f10cb2d5902447c7d0da897e2c6768bca89174d0c6e1e30abec5421af97a5b0", size = 89054 }, + { url = "https://files.pythonhosted.org/packages/68/98/b0345cabdce2041a01293ba483333582891a3bd5769b08eceb0d406056ef/watchdog-6.0.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:490ab2ef84f11129844c23fb14ecf30ef3d8a6abafd3754a6f75ca1e6654136c", size = 96480 }, + { url = "https://files.pythonhosted.org/packages/85/83/cdf13902c626b28eedef7ec4f10745c52aad8a8fe7eb04ed7b1f111ca20e/watchdog-6.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:76aae96b00ae814b181bb25b1b98076d5fc84e8a53cd8885a318b42b6d3a5134", size = 88451 }, + { url = "https://files.pythonhosted.org/packages/fe/c4/225c87bae08c8b9ec99030cd48ae9c4eca050a59bf5c2255853e18c87b50/watchdog-6.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a175f755fc2279e0b7312c0035d52e27211a5bc39719dd529625b1930917345b", size = 89057 }, + { url = "https://files.pythonhosted.org/packages/30/ad/d17b5d42e28a8b91f8ed01cb949da092827afb9995d4559fd448d0472763/watchdog-6.0.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:c7ac31a19f4545dd92fc25d200694098f42c9a8e391bc00bdd362c5736dbf881", size = 87902 }, + { url = "https://files.pythonhosted.org/packages/5c/ca/c3649991d140ff6ab67bfc85ab42b165ead119c9e12211e08089d763ece5/watchdog-6.0.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:9513f27a1a582d9808cf21a07dae516f0fab1cf2d7683a742c498b93eedabb11", size = 88380 }, + { url = "https://files.pythonhosted.org/packages/a9/c7/ca4bf3e518cb57a686b2feb4f55a1892fd9a3dd13f470fca14e00f80ea36/watchdog-6.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7607498efa04a3542ae3e05e64da8202e58159aa1fa4acddf7678d34a35d4f13", size = 79079 }, + { url = "https://files.pythonhosted.org/packages/5c/51/d46dc9332f9a647593c947b4b88e2381c8dfc0942d15b8edc0310fa4abb1/watchdog-6.0.0-py3-none-manylinux2014_armv7l.whl", hash = "sha256:9041567ee8953024c83343288ccc458fd0a2d811d6a0fd68c4c22609e3490379", size = 79078 }, + { url = "https://files.pythonhosted.org/packages/d4/57/04edbf5e169cd318d5f07b4766fee38e825d64b6913ca157ca32d1a42267/watchdog-6.0.0-py3-none-manylinux2014_i686.whl", hash = "sha256:82dc3e3143c7e38ec49d61af98d6558288c415eac98486a5c581726e0737c00e", size = 79076 }, + { url = "https://files.pythonhosted.org/packages/ab/cc/da8422b300e13cb187d2203f20b9253e91058aaf7db65b74142013478e66/watchdog-6.0.0-py3-none-manylinux2014_ppc64.whl", hash = "sha256:212ac9b8bf1161dc91bd09c048048a95ca3a4c4f5e5d4a7d1b1a7d5752a7f96f", size = 79077 }, + { url = "https://files.pythonhosted.org/packages/2c/3b/b8964e04ae1a025c44ba8e4291f86e97fac443bca31de8bd98d3263d2fcf/watchdog-6.0.0-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:e3df4cbb9a450c6d49318f6d14f4bbc80d763fa587ba46ec86f99f9e6876bb26", size = 79078 }, + { url = "https://files.pythonhosted.org/packages/62/ae/a696eb424bedff7407801c257d4b1afda455fe40821a2be430e173660e81/watchdog-6.0.0-py3-none-manylinux2014_s390x.whl", hash = "sha256:2cce7cfc2008eb51feb6aab51251fd79b85d9894e98ba847408f662b3395ca3c", size = 79077 }, + { url = "https://files.pythonhosted.org/packages/b5/e8/dbf020b4d98251a9860752a094d09a65e1b436ad181faf929983f697048f/watchdog-6.0.0-py3-none-manylinux2014_x86_64.whl", hash = "sha256:20ffe5b202af80ab4266dcd3e91aae72bf2da48c0d33bdb15c66658e685e94e2", size = 79078 }, + { url = "https://files.pythonhosted.org/packages/07/f6/d0e5b343768e8bcb4cda79f0f2f55051bf26177ecd5651f84c07567461cf/watchdog-6.0.0-py3-none-win32.whl", hash = "sha256:07df1fdd701c5d4c8e55ef6cf55b8f0120fe1aef7ef39a1c6fc6bc2e606d517a", size = 79065 }, + { url = "https://files.pythonhosted.org/packages/db/d9/c495884c6e548fce18a8f40568ff120bc3a4b7b99813081c8ac0c936fa64/watchdog-6.0.0-py3-none-win_amd64.whl", hash = "sha256:cbafb470cf848d93b5d013e2ecb245d4aa1c8fd0504e863ccefa32445359d680", size = 79070 }, + { url = "https://files.pythonhosted.org/packages/33/e8/e40370e6d74ddba47f002a32919d91310d6074130fe4e17dabcafc15cbf1/watchdog-6.0.0-py3-none-win_ia64.whl", hash = "sha256:a1914259fa9e1454315171103c6a30961236f508b9b623eae470268bbcc6a22f", size = 79067 }, ]
chore
Update documentation dependencies
a5badfb533e8214882c88fab782cdf703685938d
2024-10-27 01:05:19
Tom Payne
chore: Update tools
false
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 022af78e2cb..5e524e4658f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ env: GOVERSIONINFO_VERSION: 1.4.1 # https://github.com/josephspurrier/goversioninfo/releases PYTHON_VERSION: '3.10' # https://www.python.org/downloads/ RAGE_VERSION: 0.10.0 # https://github.com/str4d/rage/releases - UV_VERSION: 0.4.26 # https://github.com/astral-sh/uv/releases + UV_VERSION: 0.4.27 # https://github.com/astral-sh/uv/releases jobs: changes: runs-on: ubuntu-22.04
chore
Update tools
9ef2632f441356472df4333874231e38e4118a9f
2023-02-14 02:36:06
Chris Waltrip
feat: Add bitwardenAttachmentByRef template function
false
diff --git a/assets/chezmoi.io/docs/reference/templates/bitwarden-functions/bitwardenAttachmentByRef.md b/assets/chezmoi.io/docs/reference/templates/bitwarden-functions/bitwardenAttachmentByRef.md new file mode 100644 index 00000000000..6ef59ca2c97 --- /dev/null +++ b/assets/chezmoi.io/docs/reference/templates/bitwarden-functions/bitwardenAttachmentByRef.md @@ -0,0 +1,23 @@ +# `bitwardenAttachmentByRef` *filename* *args* + +`bitwardenAttachmentByRef` returns a document from +[Bitwarden](https://bitwarden.com/) using the [Bitwarden +CLI](https://bitwarden.com/help/article/cli/) (`bw`). This method requires two +calls to `bw` to complete. *args* are passed to `bw get` in order to retrieve +the item's *itemid*. Then, *filename* and *itemid* are passed to +`bw get attachment $FILENAME --itemid $ITEMID` and the output from +`bw` is returned. The output from `bw` is cached so calling +`bitwardenAttachmentByRef` multiple times with the same *filename* and *itemid* will +only invoke `bw` once. + +!!! example + + ``` + {{- bitwardenAttachmentByRef "$FILENAME" "$ARGS" -}} + ``` + +!!! example + + ``` + {{- bitwardenAttachmentByRef "id_rsa" "item" "example.com" -}} + ``` diff --git a/assets/chezmoi.io/docs/user-guide/password-managers/bitwarden.md b/assets/chezmoi.io/docs/user-guide/password-managers/bitwarden.md index 8b045f5bffb..4a38a14131b 100644 --- a/assets/chezmoi.io/docs/user-guide/password-managers/bitwarden.md +++ b/assets/chezmoi.io/docs/user-guide/password-managers/bitwarden.md @@ -18,6 +18,14 @@ $ bw unlock Set the `BW_SESSION` environment variable, as instructed. +!!! tip "Bitwarden Session One-liner" + + Set `BW_SESSION` automatically with: + + ```console + $ export BW_SESSION=$(bw {login,unlock} --raw) + ``` + The structured data from `bw get` is available as the `bitwarden` template function in your config files, for example: @@ -33,3 +41,15 @@ with: ``` {{ (bitwardenFields "item" "example.com").token.value }} ``` + +Attachments can be accessed with the `bitwardenAttachment` and +`bitwardenAttachmentByRef` template function. For example, if you have an +attachment named `id_rsa`, you can retrieve its value with: + +``` +{{ bitwardenAttachment "id_rsa" "bf22e4b4-ae4a-4d1c-8c98-ac620004b628" }} +``` +or +``` +{{ bitwardenAttachmentByRef "id_rsa" "item" "example.com" }} +``` diff --git a/assets/chezmoi.io/mkdocs.yml b/assets/chezmoi.io/mkdocs.yml index f4fd5147a21..13d8e89f90b 100644 --- a/assets/chezmoi.io/mkdocs.yml +++ b/assets/chezmoi.io/mkdocs.yml @@ -233,6 +233,7 @@ nav: - reference/templates/bitwarden-functions/index.md - bitwarden: reference/templates/bitwarden-functions/bitwarden.md - bitwardenAttachment: reference/templates/bitwarden-functions/bitwardenAttachment.md + - bitwardenAttachmentByRef: reference/templates/bitwarden-functions/bitwardenAttachmentByRef.md - bitwardenFields: reference/templates/bitwarden-functions/bitwardenFields.md - gopass functions: - reference/templates/gopass-functions/index.md diff --git a/pkg/cmd/bitwardentemplatefuncs.go b/pkg/cmd/bitwardentemplatefuncs.go index 430db9ebae5..b03bec4feee 100644 --- a/pkg/cmd/bitwardentemplatefuncs.go +++ b/pkg/cmd/bitwardentemplatefuncs.go @@ -22,6 +22,22 @@ func (c *Config) bitwardenAttachmentTemplateFunc(name, itemid string) string { return string(output) } +func (c *Config) bitwardenAttachmentByRefTemplateFunc(name string, args ...string) string { + output, err := c.bitwardenOutput(args) + if err != nil { + panic(err) + } + var data map[string]interface{} + if err := json.Unmarshal(output, &data); err != nil { + panic(newParseCmdOutputError(c.Bitwarden.Command, args, output, err)) + } + itemid, ok := data["id"].(string) + if !ok { + panic("bitwarden object has invalid id") + } + return c.bitwardenAttachmentTemplateFunc(name, itemid) +} + func (c *Config) bitwardenFieldsTemplateFunc(args ...string) map[string]any { output, err := c.bitwardenOutput(args) if err != nil { diff --git a/pkg/cmd/config.go b/pkg/cmd/config.go index 48ad9b8745c..a049a449153 100644 --- a/pkg/cmd/config.go +++ b/pkg/cmd/config.go @@ -358,6 +358,7 @@ func newConfig(options ...configOption) (*Config, error) { "awsSecretsManagerRaw": c.awsSecretsManagerRawTemplateFunc, "bitwarden": c.bitwardenTemplateFunc, "bitwardenAttachment": c.bitwardenAttachmentTemplateFunc, + "bitwardenAttachmentByRef": c.bitwardenAttachmentByRefTemplateFunc, "bitwardenFields": c.bitwardenFieldsTemplateFunc, "comment": c.commentTemplateFunc, "decrypt": c.decryptTemplateFunc, diff --git a/pkg/cmd/testdata/scripts/bitwarden.txtar b/pkg/cmd/testdata/scripts/bitwarden.txtar index fcd38b164cf..c45150dbbf1 100644 --- a/pkg/cmd/testdata/scripts/bitwarden.txtar +++ b/pkg/cmd/testdata/scripts/bitwarden.txtar @@ -14,6 +14,10 @@ stdout ^hidden-value$ exec chezmoi execute-template '{{ (bitwardenAttachment "filename" "item-id") }}' cmp stdout golden/bitwarden-attachment +# test bitwardenAttachmentByRef template function +exec chezmoi execute-template '{{ (bitwardenAttachmentByRef "filename" "item" "example.com") }}' +cmp stdout golden/bitwarden-attachment + -- bin/bw -- #!/bin/sh @@ -55,6 +59,11 @@ EOF "get attachment filename --itemid item-id --raw") cat <<EOF hidden-file-value +EOF + ;; +"get attachment filename --itemid bf22e4b4-ae4a-4d1c-8c98-ac620004b628 --raw") + cat <<EOF +hidden-file-value EOF ;; *) @@ -97,6 +106,8 @@ IF "%*" == "get item example.com" ( echo.} ) ELSE IF "%*" == "get attachment filename --itemid item-id --raw" ( echo.hidden-file-value +) ELSE IF "%*" == "get attachment filename --itemid bf22e4b4-ae4a-4d1c-8c98-ac620004b628 --raw" ( + echo.hidden-file-value ) ELSE ( echo Invalid command: $* echo "See --help for a list of available commands."
feat
Add bitwardenAttachmentByRef template function
bf2ccfe0e981261ce5d3fd42e6c56b4215c03606
2024-10-10 14:53:20
Tom Payne
chore: Move to macos-13 GitHub Action runners
false
diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml index 37b8cd5f50e..55b575de46b 100644 --- a/.github/workflows/installer.yml +++ b/.github/workflows/installer.yml @@ -46,7 +46,7 @@ jobs: strategy: matrix: os: - - macos-12 + - macos-13 - ubuntu-20.04 #- windows-2022 # fails with "debug http_download_curl received HTTP status 000" needs: changes @@ -71,7 +71,10 @@ jobs: if: ${{ needs.changes.outputs.ps1 == 'true' }} strategy: matrix: - os: [macos-12, ubuntu-20.04, windows-2022] + os: + - macos-13 + - ubuntu-20.04 + - windows-2022 needs: changes runs-on: ${{ matrix.os }} env: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8fcc280a3b3..c8bc1366fad 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -105,7 +105,7 @@ jobs: test-macos: needs: changes if: github.event_name == 'push' || needs.changes.outputs.code == 'true' - runs-on: macos-12 + runs-on: macos-13 permissions: contents: read steps:
chore
Move to macos-13 GitHub Action runners
ed9d1673f1a21817704ba4a99212d390bf5a5aac
2025-02-15 01:33:37
Tom Payne
chore: Make method names more idiomatic
false
diff --git a/internal/chezmoi/abspath.go b/internal/chezmoi/abspath.go index 7e9f9d8b08e..617e604fd3f 100644 --- a/internal/chezmoi/abspath.go +++ b/internal/chezmoi/abspath.go @@ -44,8 +44,8 @@ func (p AbsPath) Dir() AbsPath { return NewAbsPath(filepath.Dir(string(p))).ToSlash() } -// Empty returns if p is empty. -func (p AbsPath) Empty() bool { +// IsEmpty returns if p is empty. +func (p AbsPath) IsEmpty() bool { return p == "" } diff --git a/internal/chezmoi/ageencryption.go b/internal/chezmoi/ageencryption.go index 5532191ac52..13f964e2538 100644 --- a/internal/chezmoi/ageencryption.go +++ b/internal/chezmoi/ageencryption.go @@ -142,7 +142,7 @@ func (e *AgeEncryption) builtinEncrypt(plaintext []byte) ([]byte, error) { // age. func (e *AgeEncryption) builtinIdentities() ([]age.Identity, error) { var identities []age.Identity - if !e.Identity.Empty() { + if !e.Identity.IsEmpty() { parsedIdentities, err := parseIdentityFile(e.Identity) if err != nil { return nil, err @@ -177,7 +177,7 @@ func (e *AgeEncryption) builtinRecipients() ([]age.Recipient, error) { } recipients = append(recipients, parsedRecipient) } - if !e.RecipientsFile.Empty() { + if !e.RecipientsFile.IsEmpty() { parsedRecipients, err := parseRecipientsFile(e.RecipientsFile) if err != nil { return nil, err @@ -223,7 +223,7 @@ func (e *AgeEncryption) encryptArgs() []string { for _, recipient := range e.Recipients { args = append(args, "--recipient", recipient) } - if !e.RecipientsFile.Empty() { + if !e.RecipientsFile.IsEmpty() { args = append(args, "--recipients-file", e.RecipientsFile.String()) } for _, recipientsFile := range e.RecipientsFiles { @@ -236,7 +236,7 @@ func (e *AgeEncryption) encryptArgs() []string { // identityArgs returns the arguments for identity. func (e *AgeEncryption) identityArgs() []string { args := make([]string, 0, 2+2*len(e.Identities)) - if !e.Identity.Empty() { + if !e.Identity.IsEmpty() { args = append(args, "--identity", e.Identity.String()) } for _, identity := range e.Identities { diff --git a/internal/chezmoi/chezmoi.go b/internal/chezmoi/chezmoi.go index 75b55c6b177..4a0e3882753 100644 --- a/internal/chezmoi/chezmoi.go +++ b/internal/chezmoi/chezmoi.go @@ -192,8 +192,8 @@ func ParseBool(str string) (bool, error) { } } -// SuspiciousSourceDirEntry returns true if base is a suspicious dir entry. -func SuspiciousSourceDirEntry(base string, fileInfo fs.FileInfo, encryptedSuffixes []string) bool { +// IsSuspiciousSourceDirEntry returns true if base is a suspicious dir entry. +func IsSuspiciousSourceDirEntry(base string, fileInfo fs.FileInfo, encryptedSuffixes []string) bool { switch fileInfo.Mode().Type() { case 0: if strings.HasPrefix(base, Prefix) && !knownPrefixedFiles.Contains(base) { diff --git a/internal/chezmoi/dryrunsystem.go b/internal/chezmoi/dryrunsystem.go index c4151353a71..5ad08a5887b 100644 --- a/internal/chezmoi/dryrunsystem.go +++ b/internal/chezmoi/dryrunsystem.go @@ -56,9 +56,9 @@ func (s *DryRunSystem) Mkdir(name AbsPath, perm fs.FileMode) error { return nil } -// Modified returns true if a method that would have modified the wrapped system -// has been called. -func (s *DryRunSystem) Modified() bool { +// IsModified returns true if a method that would have modified the wrapped +// system has been called. +func (s *DryRunSystem) IsModified() bool { return s.modified } diff --git a/internal/chezmoi/externaldiffsystem.go b/internal/chezmoi/externaldiffsystem.go index 8f7410f6f12..052cb39eafa 100644 --- a/internal/chezmoi/externaldiffsystem.go +++ b/internal/chezmoi/externaldiffsystem.go @@ -60,7 +60,7 @@ func NewExternalDiffSystem( // Close frees all resources held by s. func (s *ExternalDiffSystem) Close() error { - if !s.tempDirAbsPath.Empty() { + if !s.tempDirAbsPath.IsEmpty() { if err := os.RemoveAll(s.tempDirAbsPath.String()); err != nil && !errors.Is(err, fs.ErrNotExist) { return err } @@ -302,7 +302,7 @@ func (s *ExternalDiffSystem) WriteSymlink(oldName string, newName AbsPath) error // tempDir creates a temporary directory for s if it does not already exist and // returns its path. func (s *ExternalDiffSystem) tempDir() (AbsPath, error) { - if s.tempDirAbsPath.Empty() { + if s.tempDirAbsPath.IsEmpty() { tempDir, err := os.MkdirTemp("", "chezmoi-diff") if err != nil { return EmptyAbsPath, err diff --git a/internal/chezmoi/realsystem.go b/internal/chezmoi/realsystem.go index 11e8b41b298..bef5b17dc1f 100644 --- a/internal/chezmoi/realsystem.go +++ b/internal/chezmoi/realsystem.go @@ -87,7 +87,7 @@ func (s *RealSystem) RunCmd(cmd *exec.Cmd) error { func (s *RealSystem) RunScript(scriptName RelPath, dir AbsPath, data []byte, options RunScriptOptions) (err error) { // Create the script temporary directory, if needed. s.createScriptTempDirOnce.Do(func() { - if !s.scriptTempDir.Empty() { + if !s.scriptTempDir.IsEmpty() { err = os.MkdirAll(s.scriptTempDir.String(), 0o700) } }) diff --git a/internal/chezmoi/sourcerelpath.go b/internal/chezmoi/sourcerelpath.go index c2283b629fc..cc21e8e45cd 100644 --- a/internal/chezmoi/sourcerelpath.go +++ b/internal/chezmoi/sourcerelpath.go @@ -36,8 +36,8 @@ func (p SourceRelPath) Dir() SourceRelPath { } } -// Empty returns true if p is empty. -func (p SourceRelPath) Empty() bool { +// IsEmpty returns true if p is empty. +func (p SourceRelPath) IsEmpty() bool { return p == SourceRelPath{} } diff --git a/internal/chezmoi/sourcestate.go b/internal/chezmoi/sourcestate.go index 617c67df4d0..48f32e6035b 100644 --- a/internal/chezmoi/sourcestate.go +++ b/internal/chezmoi/sourcestate.go @@ -397,7 +397,7 @@ func (s *SourceState) Add( for _, destAbsPath := range destAbsPaths { for _, protectedAbsPath := range options.ProtectedAbsPaths { switch { - case protectedAbsPath.Empty(): + case protectedAbsPath.IsEmpty(): // Do nothing. case strings.HasPrefix(destAbsPath.String(), protectedAbsPath.String()): format := "%s: cannot add chezmoi file to chezmoi (%s is protected)" @@ -504,7 +504,7 @@ DEST_ABS_PATH: if oldSourceStateEntry := s.root.get(targetRelPath); oldSourceStateEntry != nil { oldSourceEntryRelPath := oldSourceStateEntry.SourceRelPath() - if !oldSourceEntryRelPath.Empty() && oldSourceEntryRelPath != sourceEntryRelPath { + if !oldSourceEntryRelPath.IsEmpty() && oldSourceEntryRelPath != sourceEntryRelPath { if options.ReplaceFunc != nil { switch err := options.ReplaceFunc(targetRelPath, newSourceStateEntry, oldSourceStateEntry); { case errors.Is(err, fs.SkipDir): @@ -624,7 +624,7 @@ DEST_ABS_PATH: return err } } - if !sourceUpdate.destAbsPath.Empty() { + if !sourceUpdate.destAbsPath.IsEmpty() { if err := PersistentStateSet(persistentState, EntryStateBucket, sourceUpdate.destAbsPath.Bytes(), sourceUpdate.entryState); err != nil { return err } @@ -1983,7 +1983,7 @@ func (s *SourceState) newModifyTargetStateEntryFunc( // Create the script temporary directory, if needed. s.createScriptTempDirOnce.Do(func() { - if !s.scriptTempDirAbsPath.Empty() { + if !s.scriptTempDirAbsPath.IsEmpty() { err = os.MkdirAll(s.scriptTempDirAbsPath.String(), 0o700) } }) diff --git a/internal/chezmoigit/status.go b/internal/chezmoigit/status.go index 6870220c1a5..b10aa38d41e 100644 --- a/internal/chezmoigit/status.go +++ b/internal/chezmoigit/status.go @@ -270,8 +270,8 @@ func ParseStatusPorcelainV2(output []byte) (*Status, error) { return &status, nil } -// Empty returns true if s is empty. -func (s *Status) Empty() bool { +// IsEmpty returns true if s is empty. +func (s *Status) IsEmpty() bool { switch { case s == nil: return true diff --git a/internal/chezmoiset/chezmoiset.go b/internal/chezmoiset/chezmoiset.go index d40ddab2395..9c26377627a 100644 --- a/internal/chezmoiset/chezmoiset.go +++ b/internal/chezmoiset/chezmoiset.go @@ -55,8 +55,8 @@ func (s Set[T]) Elements() []T { return elements } -// Empty returns if s is empty. -func (s Set[T]) Empty() bool { +// IsEmpty returns if s is empty. +func (s Set[T]) IsEmpty() bool { return len(s) == 0 } diff --git a/internal/cmd/choiceflag.go b/internal/cmd/choiceflag.go index 410767ff967..5e1883a6ffb 100644 --- a/internal/cmd/choiceflag.go +++ b/internal/cmd/choiceflag.go @@ -34,7 +34,7 @@ type choiceFlag struct { // we must allow all values. func newChoiceFlag(value string, allowedValues []string) *choiceFlag { allowedValuesSet := chezmoiset.New(allowedValues...) - if !allowedValuesSet.Empty() && !allowedValuesSet.Contains(value) { + if !allowedValuesSet.IsEmpty() && !allowedValuesSet.Contains(value) { panic("value not allowed") } return &choiceFlag{ @@ -98,7 +98,7 @@ func (f *choiceFlag) UnmarshalJSON(data []byte) error { if err := json.Unmarshal(data, &value); err != nil { return err } - if !f.allowedValues.Empty() && !f.allowedValues.Contains(value) { + if !f.allowedValues.IsEmpty() && !f.allowedValues.Contains(value) { return fmt.Errorf("%s: invalid value", value) } f.value = value @@ -108,7 +108,7 @@ func (f *choiceFlag) UnmarshalJSON(data []byte) error { // UnmarshalText implements encoding.TextUnmarshaler.UnmarshalText. func (f *choiceFlag) UnmarshalText(text []byte) error { value := string(text) - if !f.allowedValues.Empty() && !f.allowedValues.Contains(value) { + if !f.allowedValues.IsEmpty() && !f.allowedValues.Contains(value) { return fmt.Errorf("%s: invalid value", value) } f.value = value diff --git a/internal/cmd/config.go b/internal/cmd/config.go index d0c82e644b3..7c86a6513b8 100644 --- a/internal/cmd/config.go +++ b/internal/cmd/config.go @@ -558,7 +558,7 @@ func newConfig(options ...configOption) (*Config, error) { } func (c *Config) getConfigFileAbsPath() (chezmoi.AbsPath, error) { - if c.customConfigFileAbsPath.Empty() { + if c.customConfigFileAbsPath.IsEmpty() { return c.defaultConfigFileAbsPath, c.defaultConfigFileAbsPathErr } return c.customConfigFileAbsPath, nil @@ -750,7 +750,7 @@ func (c *Config) checkVersion() error { func (c *Config) cmdOutput(dirAbsPath chezmoi.AbsPath, name string, args []string) ([]byte, error) { cmd := exec.Command(name, args...) cmd.Stderr = os.Stderr - if !dirAbsPath.Empty() { + if !dirAbsPath.IsEmpty() { dirRawAbsPath, err := c.baseSystem.RawPath(dirAbsPath) if err != nil { return nil, err @@ -808,8 +808,8 @@ func (c *Config) createAndReloadConfigFile(cmd *cobra.Command) error { // Write the config. configPath := c.init.configPath - if c.init.configPath.Empty() { - if c.customConfigFileAbsPath.Empty() { + if c.init.configPath.IsEmpty() { + if c.customConfigFileAbsPath.IsEmpty() { configPath = chezmoi.NewAbsPath(c.bds.ConfigHome).Join(chezmoiRelPath, configTemplate.targetRelPath) } else { configPath = c.customConfigFileAbsPath @@ -1494,7 +1494,7 @@ type getSourceDirAbsPathOptions struct { // exists. func (c *Config) getSourceDirAbsPath(options *getSourceDirAbsPathOptions) (chezmoi.AbsPath, error) { if options == nil || !options.refresh { - if !c.sourceDirAbsPath.Empty() || c.sourceDirAbsPathErr != nil { + if !c.sourceDirAbsPath.IsEmpty() || c.sourceDirAbsPathErr != nil { return c.sourceDirAbsPath, c.sourceDirAbsPathErr } } @@ -1577,7 +1577,7 @@ func (c *Config) gitAutoAdd() (*chezmoigit.Status, error) { // gitAutoCommit commits all changes in the git index, including generating a // commit message from status. func (c *Config) gitAutoCommit(cmd *cobra.Command, status *chezmoigit.Status) error { - if status.Empty() { + if status.IsEmpty() { return nil } if err := c.runHookPre("git-auto-commit"); err != nil { @@ -1598,7 +1598,7 @@ func (c *Config) gitAutoCommit(cmd *cobra.Command, status *chezmoigit.Status) er // gitAutoPush pushes all changes to the remote if status is not empty. func (c *Config) gitAutoPush(status *chezmoigit.Status) error { - if status.Empty() { + if status.IsEmpty() { return nil } if err := c.runHookPre("git-auto-push"); err != nil { @@ -2025,7 +2025,7 @@ func (c *Config) persistentPreRunRootE(cmd *cobra.Command, args []string) error }) // Enable CPU profiling if configured. - if !c.cpuProfile.Empty() { + if !c.cpuProfile.IsEmpty() { f, err := os.Create(c.cpuProfile.String()) if err != nil { return err @@ -2260,7 +2260,7 @@ func (c *Config) persistentPreRunRootE(cmd *cobra.Command, args []string) error } // Determine the working tree directory if it is not configured. - if c.WorkingTreeAbsPath.Empty() { + if c.WorkingTreeAbsPath.IsEmpty() { workingTreeAbsPath := c.SourceDirAbsPath for { gitDirAbsPath := workingTreeAbsPath.JoinString(git.GitDirName) @@ -2342,7 +2342,7 @@ func (c *Config) persistentPreRunRootE(cmd *cobra.Command, args []string) error // returning the first persistent file found, and returning the default path if // none are found. func (c *Config) persistentStateFile() (chezmoi.AbsPath, error) { - if !c.PersistentStateAbsPath.Empty() { + if !c.PersistentStateAbsPath.IsEmpty() { return c.PersistentStateAbsPath, nil } configFileAbsPath, err := c.getConfigFileAbsPath() @@ -2496,7 +2496,7 @@ func (c *Config) resetSourceState() { // run runs name with args in dir. func (c *Config) run(dir chezmoi.AbsPath, name string, args []string) error { cmd := exec.Command(name, args...) - if !dir.Empty() { + if !dir.IsEmpty() { dirRawAbsPath, err := c.baseSystem.RawPath(dir) if err != nil { return err @@ -2840,7 +2840,7 @@ func (c *Config) useBuiltinGitAutoFunc() bool { // writeOutput writes data to the configured output. func (c *Config) writeOutput(data []byte) error { - if c.outputAbsPath.Empty() || c.outputAbsPath == chezmoi.NewAbsPath("-") { + if c.outputAbsPath.IsEmpty() || c.outputAbsPath == chezmoi.NewAbsPath("-") { _, err := c.stdout.Write(data) return err } diff --git a/internal/cmd/destroycmd.go b/internal/cmd/destroycmd.go index e1323f8d70c..3970d2452eb 100644 --- a/internal/cmd/destroycmd.go +++ b/internal/cmd/destroycmd.go @@ -66,7 +66,7 @@ func (c *Config) runDestroyCmd(cmd *cobra.Command, args []string, sourceState *c } if !c.force { var prompt string - if sourceAbsPath.Empty() { + if sourceAbsPath.IsEmpty() { prompt = fmt.Sprintf("Destroy %s", destAbsPath) } else { prompt = fmt.Sprintf("Destroy %s and %s", destAbsPath, sourceAbsPath) @@ -88,7 +88,7 @@ func (c *Config) runDestroyCmd(cmd *cobra.Command, args []string, sourceState *c if err := c.destSystem.RemoveAll(destAbsPath); err != nil && !errors.Is(err, fs.ErrNotExist) { return err } - if !sourceAbsPath.Empty() { + if !sourceAbsPath.IsEmpty() { if err := c.sourceSystem.RemoveAll(sourceAbsPath); err != nil && !errors.Is(err, fs.ErrNotExist) { return err } diff --git a/internal/cmd/doctorcmd.go b/internal/cmd/doctorcmd.go index 6694c1c070a..1c940f1d264 100644 --- a/internal/cmd/doctorcmd.go +++ b/internal/cmd/doctorcmd.go @@ -577,7 +577,7 @@ func (c *dirCheck) Run(config *Config) (checkResult, string) { switch status, err := chezmoigit.ParseStatusPorcelainV2(output); { case err != nil: gitStatus = gitStatusError - case status.Empty(): + case status.IsEmpty(): gitStatus = gitStatusClean default: gitStatus = gitStatusDirty @@ -619,7 +619,7 @@ func (c *fileCheck) Name() string { } func (c *fileCheck) Run(config *Config) (checkResult, string) { - if c.filename.Empty() { + if c.filename.IsEmpty() { return c.ifNotSet, "not set" } @@ -719,7 +719,7 @@ func (c *suspiciousEntriesCheck) Run(config *Config) (checkResult, string) { if err != nil { return err } - if chezmoi.SuspiciousSourceDirEntry(absPath.Base(), fileInfo, c.encryptedSuffixes) { + if chezmoi.IsSuspiciousSourceDirEntry(absPath.Base(), fileInfo, c.encryptedSuffixes) { suspiciousEntries = append(suspiciousEntries, absPath.String()) } return nil diff --git a/internal/cmd/keepassxctemplatefuncs.go b/internal/cmd/keepassxctemplatefuncs.go index ce07b66064e..9fb56ad5046 100644 --- a/internal/cmd/keepassxctemplatefuncs.go +++ b/internal/cmd/keepassxctemplatefuncs.go @@ -151,7 +151,7 @@ func (c *Config) keepassxcAttributeTemplateFunc(entry, attribute string) string // keepassxcOutput returns the output of command and args. func (c *Config) keepassxcOutput(command string, args ...string) ([]byte, error) { - if c.Keepassxc.Database.Empty() { + if c.Keepassxc.Database.IsEmpty() { panic(errors.New("keepassxc.database not set")) } diff --git a/internal/cmd/mergecmd.go b/internal/cmd/mergecmd.go index 9c9e54509d5..a739a352d46 100644 --- a/internal/cmd/mergecmd.go +++ b/internal/cmd/mergecmd.go @@ -181,7 +181,7 @@ func (c *Config) doMerge(targetRelPath chezmoi.RelPath, sourceStateEntry chezmoi // If the source state entry was an encrypted file, then re-encrypt the // plaintext. - if !plaintextAbsPath.Empty() { + if !plaintextAbsPath.IsEmpty() { var encryptedContents []byte if encryptedContents, err = c.encryption.EncryptFile(plaintextAbsPath); err != nil { return
chore
Make method names more idiomatic
f7deac3facc2a4d88d7561fc18f2d371517b94c7
2022-01-21 22:43:59
Tom Payne
docs: Update install instructions now chezmoi is in Scoop's Main bucket
false
diff --git a/assets/chezmoi.io/docs/developer/releases.md b/assets/chezmoi.io/docs/developer/releases.md index 2a3c754a003..7f27c0d89ee 100644 --- a/assets/chezmoi.io/docs/developer/releases.md +++ b/assets/chezmoi.io/docs/developer/releases.md @@ -47,3 +47,8 @@ that builds and publishes archives, packages, and snaps, and creates a new ```console $ brew bump-formula-pr --tag=v1.2.3 chezmoi ``` + +!!! note + + chezmoi is in [Scoop](https://scoop.sh/)'s Main bucket. Scoop's automation + will automatically detect new releases within a few hours. diff --git a/assets/chezmoi.io/docs/install.md b/assets/chezmoi.io/docs/install.md index 7417b8d569c..27c7dd6f67b 100644 --- a/assets/chezmoi.io/docs/install.md +++ b/assets/chezmoi.io/docs/install.md @@ -124,7 +124,7 @@ Install chezmoi with your package manager with a single command: === "Scoop" ``` - scoop bucket add twpayne https://github.com/twpayne/scoop-bucket && scoop install chezmoi + scoop install chezmoi ``` === "FreeBSD"
docs
Update install instructions now chezmoi is in Scoop's Main bucket
fcf6c4e144e9fd8727d2c24a3567a16932c4a4b2
2022-12-28 01:29:03
Tom Payne
docs: Give more detail on passphrase-once encryption
false
diff --git a/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/encryption.md b/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/encryption.md index cfee180961d..3a318a51acb 100644 --- a/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/encryption.md +++ b/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/encryption.md @@ -18,7 +18,8 @@ First, change to chezmoi's source directory: $ chezmoi cd ``` -Generate an age private key encrypted with a passphrase with the command: +Generate an age private key encrypted with a passphrase in the file +`key.txt.age` with the command: ```console $ age-keygen | age --passphrase > key.txt.age @@ -85,7 +86,8 @@ Untracked files: nothing added to commit but untracked files present (use "git add" to track) ``` -If you're happy with the changes you can commit them. +If you're happy with the changes you can commit them. All four files should be +committed. Add files that you want to encrypt using the `--encrypt` argument to `chezmoi add`, for example:
docs
Give more detail on passphrase-once encryption
278e2be21ad896d820e8a0ff53cf934772a2dc1c
2024-04-25 03:48:44
Tom Payne
feat: Add --tree flag to ignored command
false
diff --git a/internal/cmd/config.go b/internal/cmd/config.go index afdfcfbc791..3d07ffa12bd 100644 --- a/internal/cmd/config.go +++ b/internal/cmd/config.go @@ -194,6 +194,7 @@ type Config struct { chattr chattrCmdConfig dump dumpCmdConfig executeTemplate executeTemplateCmdConfig + ignored ignoredCmdConfig _import importCmdConfig init initCmdConfig managed managedCmdConfig diff --git a/internal/cmd/ignoredcmd.go b/internal/cmd/ignoredcmd.go index b46f5c18dae..4842d2f869e 100644 --- a/internal/cmd/ignoredcmd.go +++ b/internal/cmd/ignoredcmd.go @@ -1,13 +1,15 @@ package cmd import ( - "strings" - "github.com/spf13/cobra" "github.com/twpayne/chezmoi/v2/internal/chezmoi" ) +type ignoredCmdConfig struct { + tree bool +} + func (c *Config) newIgnoredCmd() *cobra.Command { ignoredCmd := &cobra.Command{ Use: "ignored", @@ -19,18 +21,18 @@ func (c *Config) newIgnoredCmd() *cobra.Command { Annotations: newAnnotations(), } + ignoredCmd.Flags().BoolVarP(&c.ignored.tree, "tree", "t", c.ignored.tree, "Print paths as a tree") + return ignoredCmd } func (c *Config) runIgnoredCmd(cmd *cobra.Command, args []string, sourceState *chezmoi.SourceState) error { - builder := strings.Builder{} - for _, relPath := range sourceState.Ignored() { - if _, err := builder.WriteString(relPath.String()); err != nil { - return err - } - if err := builder.WriteByte('\n'); err != nil { - return err - } + relPaths := sourceState.Ignored() + paths := make([]string, 0, len(relPaths)) + for _, relPath := range relPaths { + paths = append(paths, relPath.String()) } - return c.writeOutputString(builder.String()) + return c.writePaths(paths, writePathsOptions{ + tree: c.ignored.tree, + }) } diff --git a/internal/cmd/testdata/scripts/ignore.txtar b/internal/cmd/testdata/scripts/ignore.txtar index 9ad157f1a54..22b6d61b8a0 100644 --- a/internal/cmd/testdata/scripts/ignore.txtar +++ b/internal/cmd/testdata/scripts/ignore.txtar @@ -11,6 +11,10 @@ exists $HOME/.file exec chezmoi ignored cmp stdout golden/ignored +# test that chezmoi ignored --tree lists the ignored entries in a tree-like format +exec chezmoi ignored --tree +cmp stdout golden/ignored-tree + chhome home2/user # test that chezmoi manage lists all managed files @@ -48,6 +52,9 @@ cmp stdout golden/managed-ignore-star-star-slash-star-dot-txt -- golden/ignored -- .dir README.md +-- golden/ignored-tree -- +.dir +README.md -- golden/managed-all -- .dir .dir/file.txt
feat
Add --tree flag to ignored command
da783badd0b4577e6d644b505cf8f82d21f04c71
2022-01-29 04:58:13
Tom Payne
chore: Add skippedCheck abstraction
false
diff --git a/pkg/cmd/doctorcmd.go b/pkg/cmd/doctorcmd.go index ae4db260ecf..ae10359e1ee 100644 --- a/pkg/cmd/doctorcmd.go +++ b/pkg/cmd/doctorcmd.go @@ -93,18 +93,15 @@ type goVersionCheck struct{} // An osArchCheck checks that runtime.GOOS and runtime.GOARCH are supported. type osArchCheck struct{} +// A skippedCheck is a check that is skipped. +type skippedCheck struct{} + // A suspiciousEntriesCheck checks that a source directory does not contain any // suspicious files. type suspiciousEntriesCheck struct { dirname chezmoi.AbsPath } -// A umaskCheck checks the umask. -type umaskCheck struct{} - -// A unameCheck checks uname. -type unameCheck struct{} - // A upgradeMethodCheck checks the upgrade method. type upgradeMethodCheck struct{} @@ -485,6 +482,14 @@ func (osArchCheck) Run(system chezmoi.System, homeDirAbsPath chezmoi.AbsPath) (c return checkResultOK, strings.Join(fields, " ") } +func (skippedCheck) Name() string { + return "skipped" +} + +func (skippedCheck) Run(system chezmoi.System, homeDirAbsPath chezmoi.AbsPath) (checkResult, string) { + return checkResultSkipped, "" +} + func (c *suspiciousEntriesCheck) Name() string { return "suspicious-entries" } diff --git a/pkg/cmd/doctorcmd_unix.go b/pkg/cmd/doctorcmd_unix.go index 0a98d419ff8..f8e480447ab 100644 --- a/pkg/cmd/doctorcmd_unix.go +++ b/pkg/cmd/doctorcmd_unix.go @@ -14,6 +14,11 @@ import ( "github.com/twpayne/chezmoi/v2/pkg/chezmoi" ) +type ( + umaskCheck struct{} + unameCheck struct{} +) + func (umaskCheck) Name() string { return "umask" } diff --git a/pkg/cmd/doctorcmd_windows.go b/pkg/cmd/doctorcmd_windows.go index bd06b90b34c..a236b9aef2e 100644 --- a/pkg/cmd/doctorcmd_windows.go +++ b/pkg/cmd/doctorcmd_windows.go @@ -1,19 +1,6 @@ package cmd -import "github.com/twpayne/chezmoi/v2/pkg/chezmoi" - -func (umaskCheck) Name() string { - return "umask" -} - -func (umaskCheck) Run(system chezmoi.System, homeDirAbsPath chezmoi.AbsPath) (checkResult, string) { - return checkResultSkipped, "" -} - -func (unameCheck) Name() string { - return "uname" -} - -func (unameCheck) Run(system chezmoi.System, homeDirAbsPath chezmoi.AbsPath) (checkResult, string) { - return checkResultSkipped, "" -} +type ( + umaskCheck struct{ skippedCheck } + unameCheck struct{ skippedCheck } +)
chore
Add skippedCheck abstraction
4e26293c62a68b8a4c94da623da96d6b72b4b2c3
2022-04-29 03:05:07
Tom Payne
chore: Don't try to read /etc/os-release on OSes where it does not exist
false
diff --git a/pkg/cmd/config.go b/pkg/cmd/config.go index e20795669f8..ef4b0d18f76 100644 --- a/pkg/cmd/config.go +++ b/pkg/cmd/config.go @@ -940,12 +940,18 @@ func (c *Config) defaultTemplateData() map[string]interface{} { } var osRelease map[string]interface{} - if rawOSRelease, err := chezmoi.OSRelease(c.baseSystem); err == nil { - osRelease = upperSnakeCaseToCamelCaseMap(rawOSRelease) - } else { - c.logger.Info(). - Err(err). - Msg("chezmoi.OSRelease") + switch runtime.GOOS { + case "openbsd", "windows": + // Don't populate osRelease on OSes where /etc/os-release does not + // exist. + default: + if rawOSRelease, err := chezmoi.OSRelease(c.baseSystem); err == nil { + osRelease = upperSnakeCaseToCamelCaseMap(rawOSRelease) + } else { + c.logger.Info(). + Err(err). + Msg("chezmoi.OSRelease") + } } executable, _ := os.Executable()
chore
Don't try to read /etc/os-release on OSes where it does not exist