Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add tempDir configuration variable #3847

Merged
merged 1 commit into from
Jul 1, 2024
Merged

feat: Add tempDir configuration variable #3847

merged 1 commit into from
Jul 1, 2024

Conversation

twpayne
Copy link
Owner

@twpayne twpayne commented Jul 1, 2024

Fixes #3846.

@kjkent would you be able to test this?

tl;dr set the tempDir configuration variable in your config file to be a directory in the same btrfs subvolume as your source directory. If it's in your source directory then be sure to add it to your .gitignore as well.

@kjkent
Copy link

kjkent commented Jul 1, 2024

@twpayne absolutely! I just saw your response; thank you for implementing this. I'll test it now and will report back.

@kjkent
Copy link

kjkent commented Jul 1, 2024

@twpayne alright! I've:

  1. Built the PR with go build
  2. Added tmpDir = /home/kjkent/.local/share/chezmoi/.tmp to the top level of chezmoi.toml
  3. Added .tmp to both .chezmoiignore and .gitignore
  4. Attempted chezmoi edit ~/.config/zsh/.zshrc without creating .tmp, result: exited with error due to folder not found, error message looked good.
  5. Repeated the edit command after creating .tmp within the source dir, and chezmoi opens the file in ~/.local/share/chezmoi/.tmp/chezmoi-edit3636077725/.config/zsh/.zshrc , syntax highlighting works great.
  6. To test if --watch worked, I saved the file and checked the target file for changes with the editor still open. Changes were immediately reflected in the target file.
  7. Exited nvim and checked for any leftovers in .tmp, which was emptied as expected!

Perfect scores across the board! I did also run go test ./... as mentioned in the dev docs. The first several tests passed, then the process seemed to hang for a while, before lots of output. In brief, it starts with:

chezmoi: /home/user/.secret:1: Identified a pattern that may indicate AWS credentials, risking unauthorized cloud resource access and data breaches on AWS platforms.
                                                                   chezmoi: /home/user/.dir: open /tmp/go-vfs-vfst1051716789/home/user/.dir: permission denied

then follows a lot of output, including GPG keyring creation output, diff outputs, stuff that looks like it could be a trace, some hex, context deadline exceeded, a timeout, a few oks, and then FAIL 😆 The entire output is below!

λ go test ./...
go: downloading github.com/alecthomas/assert/v2 v2.10.0
go: downloading github.com/rogpeppe/go-internal v1.12.0
go: downloading github.com/muesli/combinator v0.3.0
go: downloading golang.org/x/tools v0.22.0
go: downloading github.com/hexops/gotextdiff v1.0.3
go: downloading github.com/alecthomas/repr v0.4.0
?   	github.com/twpayne/chezmoi/v2/assets/chezmoi.io/docs	[no test files]
?   	github.com/twpayne/chezmoi/v2/assets/scripts	[no test files]
?   	github.com/twpayne/chezmoi/v2/assets/templates	[no test files]
?   	github.com/twpayne/chezmoi/v2/internal/chezmoiassert	[no test files]
?   	github.com/twpayne/chezmoi/v2/internal/chezmoierrors	[no test files]
ok  	github.com/twpayne/chezmoi/v2	0.084s
ok  	github.com/twpayne/chezmoi/v2/assets/chezmoi.io/docs/reference/commands	0.003s
ok  	github.com/twpayne/chezmoi/v2/internal/archivetest	0.005s
?   	github.com/twpayne/chezmoi/v2/internal/chezmoimaps	[no test files]
?   	github.com/twpayne/chezmoi/v2/internal/chezmoiset	[no test files]
?   	github.com/twpayne/chezmoi/v2/internal/cmds/execute-template	[no test files]
?   	github.com/twpayne/chezmoi/v2/internal/cmds/lint-txtar	[no test files]
ok  	github.com/twpayne/chezmoi/v2/internal/chezmoi	1.720s
ok  	github.com/twpayne/chezmoi/v2/internal/chezmoibubbles	0.006s
ok  	github.com/twpayne/chezmoi/v2/internal/chezmoigit	0.004s
ok  	github.com/twpayne/chezmoi/v2/internal/chezmoilog	0.004s [no tests to run]
ok  	github.com/twpayne/chezmoi/v2/internal/chezmoitest	0.007s
chezmoi: /home/user/.secret:1: Identified a pattern that may indicate AWS credentials, risking unauthorized cloud resource access and data breaches on AWS platforms.
                                                                   chezmoi: /home/user/.dir: open /tmp/go-vfs-vfst1051716789/home/user/.dir: permission denied
                                                            gpg: keybox '/tmp/test-gpg-homedir471170415/pubring.kbx' created
                          gpg: /tmp/test-gpg-homedir471170415/trustdb.gpg: trustdb created
                                                                                          gpg: directory '/tmp/test-gpg-homedir471170415/openpgp-revocs.d' created
                                                                gpg: revocation certificate stored as '/tmp/test-gpg-homedir471170415/openpgp-revocs.d/F8C4354146DD64A06C08404A7722AF0130AC5C10.rev'
                                                                                                  gpg: keybox '/tmp/test-gpg-homedir1245239091/pubring.kbx' created
                                                                 gpg: /tmp/test-gpg-homedir1245239091/trustdb.gpg: trustdb created
                                gpg: directory '/tmp/test-gpg-homedir1245239091/openpgp-revocs.d' created
       gpg: revocation certificate stored as '/tmp/test-gpg-homedir1245239091/openpgp-revocs.d/F353C30CFA95DF8520C3ABEAC0AF514852ECBCE2.rev'
                                          gpg: keybox '/tmp/test-gpg-homedir1839822919/pubring.kbx' created
         gpg: keybox '/tmp/test-gpg-homedir310722960/pubring.kbx' created
                                                                         gpg: keybox '/tmp/test-gpg-homedir2006719162/pubring.kbx' created
                                        gpg: /tmp/test-gpg-homedir1839822919/trustdb.gpg: trustdb created
       gpg: directory '/tmp/test-gpg-homedir1839822919/openpgp-revocs.d' created
                                                                                gpg: revocation certificate stored as '/tmp/test-gpg-homedir1839822919/openpgp-revocs.d/7EECEAEC9BC08ABFA5C052E0DA9FC094726BA7BA.rev'
                 gpg: /tmp/test-gpg-homedir2006719162/trustdb.gpg: trustdb created
                                                                                  gpg: directory '/tmp/test-gpg-homedir2006719162/openpgp-revocs.d' created
                                                         gpg: /tmp/test-gpg-homedir310722960/trustdb.gpg: trustdb created
                       gpg: directory '/tmp/test-gpg-homedir310722960/openpgp-revocs.d' created
                                                                                               gpg: revocation certificate stored as '/tmp/test-gpg-homedir2006719162/openpgp-revocs.d/DEDB98EF7B1410E5312A1AA882F05965B39703EB.rev'
                                gpg: revocation certificate stored as '/tmp/test-gpg-homedir310722960/openpgp-revocs.d/EF1D9AA8C98467A98BFC164030F4553E2F6EDA06.rev'
                                                                  gpg: keybox '/tmp/test-gpg-homedir1762129692/pubring.kbx' created
                                 gpg: keybox '/tmp/test-gpg-homedir2726957586/pubring.kbx' created
                                                                                                  gpg: keybox '/tmp/test-gpg-homedir889445623/pubring.kbx' created
                                                                gpg: /tmp/test-gpg-homedir1762129692/trustdb.gpg: trustdb created
                               gpg: directory '/tmp/test-gpg-homedir1762129692/openpgp-revocs.d' created
      gpg: revocation certificate stored as '/tmp/test-gpg-homedir1762129692/openpgp-revocs.d/B327FA7443101B706FD5D2118B876F0EE4B5D7CE.rev'
                                         gpg: /tmp/test-gpg-homedir2726957586/trustdb.gpg: trustdb created
        gpg: directory '/tmp/test-gpg-homedir2726957586/openpgp-revocs.d' created
                                                                                 gpg: revocation certificate stored as '/tmp/test-gpg-homedir2726957586/openpgp-revocs.d/9C5893FA1F6058B96EB08B3D1323F868B1487D3E.rev'
                  gpg: /tmp/test-gpg-homedir889445623/trustdb.gpg: trustdb created
                                                                                  gpg: directory '/tmp/test-gpg-homedir889445623/openpgp-revocs.d' created
                                                        gpg: revocation certificate stored as '/tmp/test-gpg-homedir889445623/openpgp-revocs.d/F5685AE8B5E35B8060016D80AC96BE4F241350B1.rev'
                                                                                          --- FAIL: TestScript (0.00s)
                        --- FAIL: TestScript/verify (0.07s)
                                                                   testscript.go:558: # test that chezmoi verify succeeds (0.068s)
                                            > exec chezmoi verify
                                                                             [exit status 1]
                                                                                                        FAIL: testdata/scripts/verify.txtar:8: unexpected command failure

                                                                                       --- FAIL: TestScript/diff (0.06s)
                              testscript.go:558: # test that chezmoi diff generates no output when the source and destination states are equal (0.059s)
                                                                 > exec chezmoi diff
                                                                                                [stdout]
                  diff --git a/.create b/.create
                                                            old mode 100640
                                                                                       new mode 100644
                diff --git a/.dir b/.dir
                                                    old mode 40750
                                                                              new mode 40755
                                                                                                        diff --git a/.dir/file b/.dir/file
                                                    old mode 100640
                                                                               new mode 100644
                                                                                                          diff --git a/.dir/subdir b/.dir/subdir
                                                          old mode 40750
                                                                                    new mode 40755
                                                                                                              diff --git a/.dir/subdir/file b/.dir/subdir/file
                                                                        old mode 100640
                                                                                                   new mode 100644
                            diff --git a/.empty b/.empty
                                                                    old mode 100640
                                                                                               new mode 100644
                        diff --git a/.executable b/.executable
                                                                          old mode 100750
                                                                                                     new mode 100755
                              diff --git a/.file b/.file
                                                                    old mode 100640
                                                                                               new mode 100644
                        diff --git a/.readonly b/.readonly
                                                                      old mode 100440
                                                                                                 new mode 100444
                          diff --git a/.template b/.template
                                                                        old mode 100640
                                                                                                   new mode 100644
                            > ! stdout .
                                                    FAIL: testdata/scripts/diff.txtar:9: unexpected match for `.` found in stdout: d

                                                  --- FAIL: TestScript/edgecasesumask (535.62s)
                                                                                                       testscript.go:558: # test that chezmoi add --dry-run does not modify anything (0.074s)
                                                                                                       # test that chezmoi add updates the persistent state (0.137s)
                                                                              # test that chezmoi apply updates the state if the target and destination states match, even if the last written state does not (535.411s)
                                > edit $CHEZMOISOURCEDIR/dot_file
                                                                             > edit $HOME/.file
                                                                                                           > cmp $HOME/.file $CHEZMOISOURCEDIR/dot_file
                                                                 > exec chezmoi apply --dry-run $HOME${/}.file
                        [stdout]
.file has changed since chezmoi last wrote it? diff/overwrite/all-overwrite/skip/qui[stderr]
                                                                                                        SIGQUIT: quit
                               PC=0x47d301 m=0 sigcode=0

                                                                                goroutine 21 gp=0xc000007c00 m=0 mp=0x25039c0 [syscall, 8 minutes]:
                                                             runtime.notetsleepg(0x256a300, 0xffffffffffffffff)
                         	/usr/lib/go/src/runtime/lock_futex.go:246 +0x29 fp=0xc00007ffa0 sp=0xc00007ff78 pc=0x412fa9
                                     os/signal.signal_recv()
                                                                        	/usr/lib/go/src/runtime/sigqueue.go:152 +0x29 fp=0xc00007ffc0 sp=0xc00007ffa0 pc=0x477b69
                                                                                   os/signal.loop()
             	/usr/lib/go/src/os/signal/signal_unix.go:23 +0x13 fp=0xc00007ffe0 sp=0xc00007ffc0 pc=0x5c28d3
                       runtime.goexit({})
                                                     	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00007ffe8 sp=0xc00007ffe0 pc=0x47b501
                                                           created by os/signal.Notify.func1.1 in goroutine 43
                        	/usr/lib/go/src/os/signal/signal.go:151 +0x1f

                                                                                                     goroutine 1 gp=0xc0000061c0 m=nil [select]:
                                                          runtime.gopark(0xc000711cb0?, 0x3?, 0x0?, 0x0?, 0xc000711c5a?)
                                  	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc000711b00 sp=0xc000711ae0 pc=0x4436ee
                                       runtime.selectgo(0xc000711cb0, 0xc000711c54, 0xc00042a180?, 0x0, 0x60?, 0x1)
                             	/usr/lib/go/src/runtime/select.go:327 +0x725 fp=0xc000711c20 sp=0xc000711b00 pc=0x455565
                                  github.com/charmbracelet/bubbletea.(*Program).eventLoop(0xc000042100, {0x1ad5750?, 0xc000766008?}, 0xc00004d7a0)
                                                            	/home/kjkent/.local/share/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:309 +0xf8 fp=0xc000711d18 sp=0xc000711c20 pc=0x115b538
                     github.com/charmbracelet/bubbletea.(*Program).Run(0xc000042100)
                                                                                                	/home/kjkent/.local/share/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:550 +0xa0e fp=0xc000711f68 sp=0xc000711d18 pc=0x115c9ce
                                                       github.com/twpayne/chezmoi/v2/internal/cmd.runModel[...]({{{0x0, 0x0}, {0xc0001b8900, 0x2f}, {0xc0001b8930, 0x26}, 0x0, 0x2a, {0x1f972880, {0x0, ...}, ...}, ...}, ...})
                                       	/home/kjkent/sync/dev/linux/chezmoi/internal/cmd/prompt.go:257 +0x6a fp=0xc000711fa0 sp=0xc000711f68 pc=0x12a434a
                                                                   github.com/twpayne/chezmoi/v2/internal/cmd.runCancelableModel[...]({{{0x0, 0x0}, {0xc0001b8900, 0x2f}, {0xc0001b8930, 0x26}, 0x0, 0x2a, {0x1f972880, {0x0, ...}, ...}, ...}, ...})
                                                             	/home/kjkent/sync/dev/linux/chezmoi/internal/cmd/prompt.go:245 +0x8e fp=0xc000717118 sp=0xc000711fa0 pc=0x12a418e
                                                                                           github.com/twpayne/chezmoi/v2/internal/cmd.(*Config).readChoice(0x50?, {0xc0001b88d0?, 0x50fe01?}, {0xc0003f8230?, 0xc0008f81c0?, 0x2d?}, 0x5?)
                                                  	/home/kjkent/sync/dev/linux/chezmoi/internal/cmd/prompt.go:71 +0x20e fp=0xc00071eee0 sp=0xc000717118 pc=0x124f9ae
                                                                                   github.com/twpayne/chezmoi/v2/internal/cmd.(*Config).promptChoice(0xc000467290?, {0xc0001b88d0?, 0xc00071f140?}, {0xc0003f8230?, 0x139a8a0?, 0x13?}, {0x0?, 0x4?, 0x4?})
                                                                   	/home/kjkent/sync/dev/linux/chezmoi/internal/cmd/prompt.go:203 +0x105 fp=0xc00071ef50 sp=0xc00071eee0 pc=0x1250a25
                                                                                                    github.com/twpayne/chezmoi/v2/internal/cmd.(*Config).defaultPreApplyFunc(0xc000409008, {{0x7ffd97ea09c6?, 0x1d?}}, 0xc0003f80f0, 0xc0003f8190, 0xc0003f81e0)
                                                                        	/home/kjkent/sync/dev/linux/chezmoi/internal/cmd/config.go:1034 +0xcd2 fp=0xc00071f1c8 sp=0xc00071ef50 pc=0x121c792
                                                                                                             github.com/twpayne/chezmoi/v2/internal/cmd.(*Config).defaultPreApplyFunc-fm({{0x7ffd97ea09c6?, 0xc0003f8190?}}, 0x1adf658?, 0xc0000bc1e0?, 0x244b490?)
                                                                           	<autogenerated>:1 +0x37 fp=0xc00071f208 sp=0xc00071f1c8 pc=0x12a9917
                                                              github.com/twpayne/chezmoi/v2/internal/chezmoi.(*SourceState).Apply(0xc000586300, {0x1ae31a0, 0xc0004e26f0}, {0x1ae31a0, 0xc0004e26f0}, {0x1adf658, 0xc0000bc1e0}, {0xc000048005, 0x3d}, {{0x7ffd97ea09c6, ...}}, ...)
                                                                                            	/home/kjkent/sync/dev/linux/chezmoi/internal/chezmoi/sourcestate.go:752 +0x67d fp=0xc00071f2d8 sp=0xc00071f208 pc=0xa6a59d
                                  github.com/twpayne/chezmoi/v2/internal/cmd.(*Config).applyArgs(0xc000409008, {0x1ad92f0, 0x2569440}, {0x1ae31a0, 0xc0004e26f0}, {0xc000048005, 0x3d}, {0xc0002fe8e0, 0x1, 0x2}, ...)
                              	/home/kjkent/sync/dev/linux/chezmoi/internal/cmd/config.go:656 +0x69f fp=0xc00071f4e8 sp=0xc00071f2d8 pc=0x121905f
                                                            github.com/twpayne/chezmoi/v2/internal/cmd.(*Config).runApplyCmd(0xc000409008, 0xc00071f4c0?, {0xc0002fe8e0, 0x1, 0x2})
                                                                                             	/home/kjkent/sync/dev/linux/chezmoi/internal/cmd/applycmd.go:39 +0x151 fp=0xc00071f598 sp=0xc00071f4e8 pc=0x1209d91
                           github.com/twpayne/chezmoi/v2/internal/cmd.(*Config).runApplyCmd-fm(0xc000122900?, {0xc0002fe8e0?, 0x4?, 0x161399d?})
                                                          	<autogenerated>:1 +0x34 fp=0xc00071f5d0 sp=0xc00071f598 pc=0x12ac474
                                              github.com/spf13/cobra.(*Command).execute(0xc00056db08, {0xc0002fe8c0, 0x2, 0x2})
                                         	/home/kjkent/.local/share/go/pkg/mod/github.com/spf13/[email protected]/command.go:985 +0xaca fp=0xc00071f758 sp=0xc00071f5d0 pc=0x69ca4a
                                                                                              github.com/spf13/cobra.(*Command).ExecuteC(0xc00056c908)
                                                                	/home/kjkent/.local/share/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117 +0x3ff fp=0xc00071f830 sp=0xc00071f758 pc=0x69d31f
                     github.com/spf13/cobra.(*Command).Execute(...)
                                                                               	/home/kjkent/.local/share/go/pkg/mod/github.com/spf13/[email protected]/command.go:1041
                                                                            github.com/twpayne/chezmoi/v2/internal/cmd.(*Config).execute(0xc00071fa00?, {0xc0001ae010, 0x3, 0x3})
                                                                                           	/home/kjkent/sync/dev/linux/chezmoi/internal/cmd/config.go:1230 +0x78 fp=0xc00071f848 sp=0xc00071f830 pc=0x121d978
                          github.com/twpayne/chezmoi/v2/internal/cmd.runMain({{0x1623f3e, 0xb}, {0x1613b8d, 0x4}, {0xc00052dec0, 0x14}, {0x16215b5, 0xa}}, {0xc0001ae010, 0x3, ...})
                                                                                              	/home/kjkent/sync/dev/linux/chezmoi/internal/cmd/cmd.go:270 +0x25c fp=0xc00071fa30 sp=0xc00071f848 pc=0x1212fbc
                       github.com/twpayne/chezmoi/v2/internal/cmd.Main({{0x1623f3e, 0xb}, {0x1613b8d, 0x4}, {0xc00052dec0, 0x14}, {0x16215b5, 0xa}}, {0xc0001ae010, 0x3, ...})
                                                                                        	/home/kjkent/sync/dev/linux/chezmoi/internal/cmd/cmd.go:106 +0xa5 fp=0xc00071fac0 sp=0xc00071fa30 pc=0x1212145
                      github.com/twpayne/chezmoi/v2/internal/cmd_test.TestMain.func1()
                                                                                                  /home/kjkent/sync/dev/linux/chezmoi/internal/cmd/main_test.go:42 +0x176 fp=0xc00071fb80 sp=0xc00071fac0 pc=0x12cc416
                              github.com/rogpeppe/go-internal/testscript.RunMain({0x1ac9ca0, 0xc0003b7540}, 0xc00071fe58)
                                   	/home/kjkent/.local/share/go/pkg/mod/github.com/rogpeppe/[email protected]/testscript/exe.go:104 +0xff fp=0xc00071fd68 sp=0xc00071fb80 pc=0x12bb5ff
                                                                                                       github.com/twpayne/chezmoi/v2/internal/cmd_test.TestMain(0xc0003b7540)
                                                                                       	/home/kjkent/sync/dev/linux/chezmoi/internal/cmd/main_test.go:40 +0xd3 fp=0xc00071fe98 sp=0xc00071fd68 pc=0x12c4d73
                   main.main()
                                          	_testmain.go:171 +0x195 fp=0xc00071ff50 sp=0xc00071fe98 pc=0x12cc635
                              runtime.main()
                                                        	/usr/lib/go/src/runtime/proc.go:271 +0x29d fp=0xc00071ffe0 sp=0xc00071ff50 pc=0x44329d
                                                                runtime.goexit({})
                                                                                              	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00071ffe8 sp=0xc00071ffe0 pc=0x47b501

             goroutine 2 gp=0xc000006c40 m=nil [force gc (idle), 8 minutes]:
                                                                                        runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
                                              	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc00007cfa8 sp=0xc00007cf88 pc=0x4436ee
                                               runtime.goparkunlock(...)
                                                                                    	/usr/lib/go/src/runtime/proc.go:408
                                     runtime.forcegchelper()
                                                                        	/usr/lib/go/src/runtime/proc.go:326 +0xb3 fp=0xc00007cfe0 sp=0xc00007cfa8 pc=0x443553
                                                                               runtime.goexit({})
                                                                                                             	  /usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00007cfe8 sp=0xc00007cfe0 pc=0x47b501
                   created by runtime.init.6 in goroutine 1
                                                                       	/usr/lib/go/src/runtime/proc.go:314 +0x1a

                                       goroutine 3 gp=0xc000007180 m=nil [GC sweep wait]:
                                                                                                     runtime.gopark(0x24ff101?, 0x0?, 0x0?, 0x0?, 0x0?)
                                                                 	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc00007d780 sp=0xc00007d760 pc=0x4436ee
                                                                       runtime.goparkunlock(...)
                                                                                                            	  /usr/lib/go/src/runtime/proc.go:408
                                                               runtime.bgsweep(0xc00004e070)
                                                                                                        	/usr/lib/go/src/runtime/mgcsweep.go:318 +0xdf fp=0xc00007d7c8 sp=0xc00007d780 pc=0x42d23f
                                                                                                             runtime.gcenable.gowrap1()
                                                 	/usr/lib/go/src/runtime/mgc.go:203 +0x25 fp=0xc00007d7e0 sp=0xc00007d7c8 pc=0x421b45
                                                      runtime.goexit({})
                                                                                    	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00007d7e8 sp=0xc00007d7e0 pc=0x47b501
                                                                                           created by runtime.gcenable in goroutine 1
                                               	/usr/lib/go/src/runtime/mgc.go:203 +0x66

              goroutine 4 gp=0xc000007340 m=nil [GC scavenge wait]:
                                                                               runtime.gopark(0x3ba3d975?, 0x3b9aca00?, 0x0?, 0x0?, 0x0?)
                                                   	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc00007df78 sp=0xc00007df58 pc=0x4436ee
                                                       runtime.goparkunlock(...)
                                                                                            	/usr/lib/go/src/runtime/proc.go:408
                                             runtime.(*scavengerState).park(0x2501800)
                                                                                                  /usr/lib/go/src/runtime/mgcscavenge.go:425 +0x49 fp=0xc00007dfa8 sp=0xc00007df78 pc=0x42abe9
                                                                                                        runtime.bgscavenge(0xc00004e070)
                                                  	/usr/lib/go/src/runtime/mgcscavenge.go:658 +0x59 fp=0xc00007dfc8 sp=0xc00007dfa8 pc=0x42b199
                                                              runtime.gcenable.gowrap2()
                                                                                                    	  /usr/lib/go/src/runtime/mgc.go:204 +0x25 fp=0xc00007dfe0 sp=0xc00007dfc8 pc=0x421ae5
                                                                                                        runtime.goexit({})
                                    	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00007dfe8 sp=0xc00007dfe0 pc=0x47b501
                                           created by runtime.gcenable in goroutine 1
                                                                                                 /usr/lib/go/src/runtime/mgc.go:204 +0xa5

                                                               goroutine 18 gp=0xc000186380 m=nil [finalizer wait, 8 minutes]:
                                        runtime.gopark(0xc00007c648?, 0x414985?, 0xa8?, 0x1?, 0xc0000061c0?)
                      	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc00007c620 sp=0xc00007c600 pc=0x4436ee
                       runtime.runfinq()
                                                    	/usr/lib/go/src/runtime/mfinal.go:194 +0x107 fp=0xc00007c7e0 sp=0xc00007c620 pc=0x420b87
                                                          runtime.goexit({})
                                                                                        	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00007c7e8 sp=0xc00007c7e0 pc=0x47b501
                                                                                                   created by runtime.createfing in goroutine 1
                                                         	/usr/lib/go/src/runtime/mfinal.go:164 +0x3d

                                 goroutine 19 gp=0xc000186a80 m=nil [GC worker (idle)]:
                                                                                                   runtime.gopark(0x256b220?, 0x1?, 0x76?, 0x64?, 0x0?)
                                                                 	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc000078750 sp=0xc000078730 pc=0x4436ee
                                                                       runtime.gcBgMarkWorker()
                                                                                                           	  /usr/lib/go/src/runtime/mgc.go:1310 +0xe5 fp=0xc0000787e0 sp=0xc000078750 pc=0x423c25
               runtime.goexit({})
                                             	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0000787e8 sp=0xc0000787e0 pc=0x47b501
                                                   created by runtime.gcBgMarkStartWorkers in goroutine 1
                   	/usr/lib/go/src/runtime/mgc.go:1234 +0x1c

                                                                                         goroutine 5 gp=0xc000007880 m=nil [GC worker (idle)]:
                                                        runtime.gopark(0xb6a8b6071803?, 0x3?, 0x20?, 0x8?, 0x0?)
                          	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc00007e750 sp=0xc00007e730 pc=0x4436ee
                               runtime.gcBgMarkWorker()
                                                                   	/usr/lib/go/src/runtime/mgc.go:1310 +0xe5 fp=0xc00007e7e0 sp=0xc00007e750 pc=0x423c25
                                                                       runtime.goexit({})
                                                                                                     	  /usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00007e7e8 sp=0xc00007e7e0 pc=0x47b501
                                                                                                             created by runtime.gcBgMarkStartWorkers in goroutine 1
                                                                             	/usr/lib/go/src/runtime/mgc.go:1234 +0x1c

                                               goroutine 34 gp=0xc000102700 m=nil [GC worker (idle)]:
               runtime.gopark(0xb6a8b6071f2c?, 0x1?, 0x3?, 0x5a?, 0x0?)
                                                                                   	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc00011c750 sp=0xc00011c730 pc=0x4436ee
                                                                                       runtime.gcBgMarkWorker()
                         	/usr/lib/go/src/runtime/mgc.go:1310 +0xe5 fp=0xc00011c7e0 sp=0xc00011c750 pc=0x423c25
                               runtime.goexit({})
                                                             	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00011c7e8 sp=0xc00011c7e0 pc=0x47b501
                                                                   created by runtime.gcBgMarkStartWorkers in goroutine 1
                                   	/usr/lib/go/src/runtime/mgc.go:1234 +0x1c

                                                                                                         goroutine 35 gp=0xc0001028c0 m=nil [GC worker (idle)]:
                                                                         runtime.gopark(0xb6a8b6075307?, 0x1?, 0x35?, 0xf1?, 0x0?)
                                            	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc00011cf50 sp=0xc00011cf30 pc=0x4436ee
                                               runtime.gcBgMarkWorker()
                                                                                   	/usr/lib/go/src/runtime/mgc.go:1310 +0xe5 fp=0xc00011cfe0 sp=0xc00011cf50 pc=0x423c25
                                                                                       runtime.goexit({})
                   	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00011cfe8 sp=0xc00011cfe0 pc=0x47b501
                           created by runtime.gcBgMarkStartWorkers in goroutine 1
                                                                                             	/usr/lib/go/src/runtime/mgc.go:1234 +0x1c

                                                               goroutine 36 gp=0xc000102a80 m=nil [GC worker (idle)]:
                               runtime.gopark(0xb6a8b606d477?, 0x3?, 0x55?, 0xa?, 0x0?)
                                                                                                   	  /usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc00011d750 sp=0xc00011d730 pc=0x4436ee
                                                                                                         runtime.gcBgMarkWorker()
                                           	/usr/lib/go/src/runtime/mgc.go:1310 +0xe5 fp=0xc00011d7e0 sp=0xc00011d750 pc=0x423c25
                                               runtime.goexit({})
                                                                             	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00011d7e8 sp=0xc00011d7e0 pc=0x47b501
                                                                                   created by runtime.gcBgMarkStartWorkers in goroutine 1
                                                   	/usr/lib/go/src/runtime/mgc.go:1234 +0x1c

                       goroutine 37 gp=0xc000102c40 m=nil [GC worker (idle)]:
                                                                                         runtime.gopark(0xb6a8b606da87?, 0x3?, 0x46?, 0xea?, 0x0?)
                                                            	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc00011df50 sp=0xc00011df30 pc=0x4436ee
                                                               runtime.gcBgMarkWorker()
                                                                                                   	  /usr/lib/go/src/runtime/mgc.go:1310 +0xe5 fp=0xc00011dfe0 sp=0xc00011df50 pc=0x423c25
                                                                                                         runtime.goexit({})
                                     	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00011dfe8 sp=0xc00011dfe0 pc=0x47b501
                                           created by runtime.gcBgMarkStartWorkers in goroutine 1
                                                                                                             	  /usr/lib/go/src/runtime/mgc.go:1234 +0x1c

                                                                                 goroutine 38 gp=0xc000102e00 m=nil [GC worker (idle), 3 minutes]:
                                                            runtime.gopark(0xb694342e96ec?, 0x3?, 0x1d?, 0xe1?, 0x0?)
                               	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc00011e750 sp=0xc00011e730 pc=0x4436ee
                               runtime.gcBgMarkWorker()
                                                                   	/usr/lib/go/src/runtime/mgc.go:1310 +0xe5 fp=0xc00011e7e0 sp=0xc00011e750 pc=0x423c25
                                                                       runtime.goexit({})
                                                                                                     	  /usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00011e7e8 sp=0xc00011e7e0 pc=0x47b501
                                                                                                             created by runtime.gcBgMarkStartWorkers in goroutine 1
                                                                             	/usr/lib/go/src/runtime/mgc.go:1234 +0x1c

                                               goroutine 39 gp=0xc000102fc0 m=nil [GC worker (idle)]:
               runtime.gopark(0xb6a8b6075e60?, 0x3?, 0x9?, 0x3a?, 0x0?)
                                                                                   	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc00011ef50 sp=0xc00011ef30 pc=0x4436ee
                                                                                       runtime.gcBgMarkWorker()
                         	/usr/lib/go/src/runtime/mgc.go:1310 +0xe5 fp=0xc00011efe0 sp=0xc00011ef50 pc=0x423c25
                               runtime.goexit({})
                                                             	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00011efe8 sp=0xc00011efe0 pc=0x47b501
                                                                   created by runtime.gcBgMarkStartWorkers in goroutine 1
                                   	/usr/lib/go/src/runtime/mgc.go:1234 +0x1c

                                                                                                         goroutine 40 gp=0xc000103180 m=nil [GC worker (idle)]:
                                                                         runtime.gopark(0xb6a8b6071961?, 0x3?, 0x94?, 0x4?, 0x0?)
                                           	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc00011f750 sp=0xc00011f730 pc=0x4436ee
                                               runtime.gcBgMarkWorker()
                                                                                   	/usr/lib/go/src/runtime/mgc.go:1310 +0xe5 fp=0xc00011f7e0 sp=0xc00011f750 pc=0x423c25
                                                                                       runtime.goexit({})
                   	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00011f7e8 sp=0xc00011f7e0 pc=0x47b501
                           created by runtime.gcBgMarkStartWorkers in goroutine 1
                                                                                             	/usr/lib/go/src/runtime/mgc.go:1234 +0x1c

                                                               goroutine 41 gp=0xc000103340 m=nil [GC worker (idle)]:
                               runtime.gopark(0xb6a8b6071ff5?, 0x1?, 0x25?, 0xbe?, 0x0?)
                                                                                                    	  /usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc00011ff50 sp=0xc00011ff30 pc=0x4436ee
                                                                                                         runtime.gcBgMarkWorker()
                                           	/usr/lib/go/src/runtime/mgc.go:1310 +0xe5 fp=0xc00011ffe0 sp=0xc00011ff50 pc=0x423c25
                                               runtime.goexit({})
                                                                             	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00011ffe8 sp=0xc00011ffe0 pc=0x47b501
                                                                                   created by runtime.gcBgMarkStartWorkers in goroutine 1
                                                   	/usr/lib/go/src/runtime/mgc.go:1234 +0x1c

                       goroutine 42 gp=0xc000103500 m=nil [GC worker (idle)]:
                                                                                         runtime.gopark(0xb6a8b606f420?, 0x3?, 0x39?, 0x84?, 0x0?)
                                                            	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc000118750 sp=0xc000118730 pc=0x4436ee
                                                               runtime.gcBgMarkWorker()
                                                                                                   	  /usr/lib/go/src/runtime/mgc.go:1310 +0xe5 fp=0xc0001187e0 sp=0xc000118750 pc=0x423c25
                                                                                                         runtime.goexit({})
                                     	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0001187e8 sp=0xc0001187e0 pc=0x47b501
                                           created by runtime.gcBgMarkStartWorkers in goroutine 1
                                                                                                             	  /usr/lib/go/src/runtime/mgc.go:1234 +0x1c

                                                                                 goroutine 50 gp=0xc000500000 m=nil [GC worker (idle)]:
                                                 runtime.gopark(0xb6a8b6076254?, 0x3?, 0xf1?, 0x38?, 0x0?)
                    	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc000506750 sp=0xc000506730 pc=0x4436ee
                       runtime.gcBgMarkWorker()
                                                           	/usr/lib/go/src/runtime/mgc.go:1310 +0xe5 fp=0xc0005067e0 sp=0xc000506750 pc=0x423c25
                                                               runtime.goexit({})
                                                                                             	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0005067e8 sp=0xc0005067e0 pc=0x47b501
                                                                                                   created by runtime.gcBgMarkStartWorkers in goroutine 1
                                                                   	/usr/lib/go/src/runtime/mgc.go:1234 +0x1c

                                       goroutine 43 gp=0xc000500540 m=nil [select, 8 minutes]:
                                                                                                          runtime.gopark(0xc00007bf70?, 0x2?, 0x60?, 0x0?, 0xc00007bf44?)
                                                                                   	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc00007bde8 sp=0xc00007bdc8 pc=0x4436ee
                                                                                       runtime.selectgo(0xc00007bf70, 0xc00007bf40, 0x2?, 0x0, 0x0?, 0x1)
                                                                   	/usr/lib/go/src/runtime/select.go:327 +0x725 fp=0xc00007bf08 sp=0xc00007bde8 pc=0x455565
                                                                          github.com/charmbracelet/bubbletea.(*Program).handleSignals.func1()
                                                       	/home/kjkent/.local/share/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:232 +0x14c fp=0xc00007bfe0 sp=0xc00007bf08 pc=0x115adcc
              runtime.goexit({})
                                            	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00007bfe8 sp=0xc00007bfe0 pc=0x47b501
                                                   created by github.com/charmbracelet/bubbletea.(*Program).handleSignals in goroutine 1
                                                  	/home/kjkent/.local/share/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:223 +0x78

                                                                              goroutine 20 gp=0xc000007a40 m=nil [select, 8 minutes, locked to thread]:
                                                                 runtime.gopark(0xc00007f7a8?, 0x2?, 0x89?, 0x39?, 0xc00007f794?)
                                           	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc00007f638 sp=0xc00007f618 pc=0x4436ee
                                               runtime.selectgo(0xc00007f7a8, 0xc00007f790, 0x0?, 0x0, 0x0?, 0x1)
                           	/usr/lib/go/src/runtime/select.go:327 +0x725 fp=0xc00007f758 sp=0xc00007f638 pc=0x455565
                                  runtime.ensureSigM.func1()
                                                                        	/usr/lib/go/src/runtime/signal_unix.go:1034 +0x19f fp=0xc00007f7e0 sp=0xc00007f758 pc=0x47235f
                                                                                        runtime.goexit({})
                    	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00007f7e8 sp=0xc00007f7e0 pc=0x47b501
                           created by runtime.ensureSigM in goroutine 43
                                                                                    	/usr/lib/go/src/runtime/signal_unix.go:1017 +0xc8

                                                               goroutine 44 gp=0xc0005008c0 m=nil [select]:
                     runtime.gopark(0xc00008cf98?, 0x2?, 0x9?, 0x3?, 0xc00008cf94?)
                                                                                               	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc00008ce40 sp=0xc00008ce20 pc=0x4436ee
                                                                                               runtime.selectgo(0xc00008cf98, 0xc00008cf90, 0x0?, 0x0, 0x0?, 0x1)
                                                                           	/usr/lib/go/src/runtime/select.go:327 +0x725 fp=0xc00008cf60 sp=0xc00008ce40 pc=0x455565
                                                                                  github.com/charmbracelet/bubbletea.(*standardRenderer).listen(0xc0001ec0c0)
                                                                       	/home/kjkent/.local/share/go/pkg/mod/github.com/charmbracelet/[email protected]/standard_renderer.go:140 +0x65 fp=0xc00008cfc8 sp=0xc00008cf60 pc=0x1157885
                                           github.com/charmbracelet/bubbletea.(*standardRenderer).start.gowrap1()
                           	/home/kjkent/.local/share/go/pkg/mod/github.com/charmbracelet/[email protected]/standard_renderer.go:94 +0x25 fp=0xc00008cfe0 sp=0xc00008cfc8 pc=0x1157405
                                                                                                    runtime.goexit({})
                                	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00008cfe8 sp=0xc00008cfe0 pc=0x47b501
                                           created by github.com/charmbracelet/bubbletea.(*standardRenderer).start in goroutine 1
                                           	/home/kjkent/.local/share/go/pkg/mod/github.com/charmbracelet/[email protected]/standard_renderer.go:94 +0xbf

                                                                                   goroutine 2066 gp=0xc000500a80 m=nil [chan receive]:
                                                 runtime.gopark(0x53ff39?, 0xc0004c1518?, 0xa0?, 0x0?, 0xc0006d9980?)
                               	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc00008ee40 sp=0xc00008ee20 pc=0x4436ee
                               runtime.chanrecv(0xc0006d9980, 0x0, 0x1)
                                                                                   	/usr/lib/go/src/runtime/chan.go:583 +0x3bf fp=0xc00008eeb8 sp=0xc00008ee40 pc=0x40cfbf
                                                                                        runtime.chanrecv1(0x14d6860?, 0xc00004d740?)
                                              	/usr/lib/go/src/runtime/chan.go:442 +0x12 fp=0xc00008eee0 sp=0xc00008eeb8 pc=0x40cbd2
                                               github.com/charmbracelet/bubbles/cursor.(*Model).BlinkCmd.func1()
                          	/home/kjkent/.local/share/go/pkg/mod/github.com/charmbracelet/[email protected]/cursor/cursor.go:166 +0x5a fp=0xc00008ef50 sp=0xc00008eee0 pc=0x115f01a
                                                                                               github.com/charmbracelet/bubbletea.(*Program).handleCommands.func1.1()
                                                                               	/home/kjkent/.local/share/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:289 +0x29 fp=0xc00008efe0 sp=0xc00008ef50 pc=0x115b2c9
                                     runtime.goexit({})
                                                                   	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00008efe8 sp=0xc00008efe0 pc=0x47b501
                                                                           created by github.com/charmbracelet/bubbletea.(*Program).handleCommands.func1 in goroutine 47
                                                                                  	/home/kjkent/.local/share/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:288 +0x139

             goroutine 46 gp=0xc000500c40 m=3 mp=0xc000083008 [syscall, 8 minutes]:
                                                                                               syscall.Syscall6(0xe8, 0x7, 0xc000119d7c, 0x1, 0xffffffffffffffff, 0x0, 0x0)
                                                                                     	/usr/lib/go/src/syscall/syscall_linux.go:91 +0x39 fp=0xc000119c98 sp=0xc000119c38 pc=0x493fd9
                                                                                               syscall.Syscall6(0xe8, 0x7, 0xc000119d7c, 0x1, 0xffffffffffffffff, 0x0, 0x0)
                                                                                     	<autogenerated>:1 +0x3d fp=0xc000119ce0 sp=0xc000119c98 pc=0x4949fd
                                                                     golang.org/x/sys/unix.EpollWait(0xc000119dd8?, {0xc000119d7c?, 0xc000119da8?, 0x1122255?}, 0x46fba5?)
                                                                                    	/home/kjkent/.local/share/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_linux_amd64.go:55 +0x4f fp=0xc000119d50 sp=0xc000119ce0 pc=0x8e86af
                                               github.com/muesli/cancelreader.(*epollCancelReader).wait(0xc0003f8370)
                               	/home/kjkent/.local/share/go/pkg/mod/github.com/muesli/[email protected]/cancelreader_linux.go:134 +0x4f fp=0xc000119db8 sp=0xc000119d50 pc=0x1122d2f
                                                                                                 github.com/muesli/cancelreader.(*epollCancelReader).Read(0xc0003f8370, {0xc000190200, 0x100, 0x100})
             	/home/kjkent/.local/share/go/pkg/mod/github.com/muesli/[email protected]/cancelreader_linux.go:78 +0x46 fp=0xc000119e10 sp=0xc000119db8 pc=0x1122826
                                                                                github.com/charmbracelet/bubbletea.readAnsiInputs({0x1ad9520, 0xc0003f82d0}, 0xc00004d740, {0x7b059cbcb918, 0xc0003f8370})
                  	/home/kjkent/.local/share/go/pkg/mod/github.com/charmbracelet/[email protected]/key.go:565 +0xa6 fp=0xc000119f00 sp=0xc000119e10 pc=0x1155606
                                                                               github.com/charmbracelet/bubbletea.readInputs(...)
                                           	/home/kjkent/.local/share/go/pkg/mod/github.com/charmbracelet/[email protected]/key_other.go:12
                                                         github.com/charmbracelet/bubbletea.(*Program).readLoop(0xc000042100)
                                       	/home/kjkent/.local/share/go/pkg/mod/github.com/charmbracelet/[email protected]/tty.go:73 +0xb0 fp=0xc000119fc8 sp=0xc000119f00 pc=0x115dc30
                                                                                              github.com/charmbracelet/bubbletea.(*Program).initCancelReader.gowrap1()
                                                                                	/home/kjkent/.local/share/go/pkg/mod/github.com/charmbracelet/[email protected]/tty.go:65 +0x25 fp=0xc000119fe0 sp=0xc000119fc8 pc=0x115db45
                                            runtime.goexit({})
                                                                          	/usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000119fe8 sp=0xc000119fe0 pc=0x47b501
                                                                                   created by github.com/charmbracelet/bubbletea.(*Program).initCancelReader in goroutine 1
                                                                                     	/home/kjkent/.local/share/go/pkg/mod/github.com/charmbracelet/[email protected]/tty.go:65 +0x11b

                                                                                                              goroutine 47 gp=0xc000500e00 m=nil [select]:
                                                                    runtime.gopark(0xc00011a790?, 0x2?, 0xf8?, 0xd4?, 0xc00011a774?)
                                              	/usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc00011a618 sp=0xc00011a5f8 pc=0x4436ee
                                               runtime.selectgo(0xc00011a790, 0xc00011a770, 0x0?, 0x0, 0x0?, 0x1)
                           	/usr/lib/go/src/runtime/select.go:327 +0x725 fp=0xc00011a738 sp=0xc00011a618 pc=0x455565
                                  github.com/charmbracelet/bubbletea.(*Program).handleCommands.func1()
                	/home/kjkent/.local/share/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:274 +0xd4 fp=0xc00011a7e0 sp=0xc00011a738 pc=0x115b1f4
                                                                               runtime.goexit({})
                                                                                                             	  /usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00011a7e8 sp=0xc00011a7e0 pc=0x47b501
                   created by github.com/charmbracelet/bubbletea.(*Program).handleCommands in goroutine 1
                   	/home/kjkent/.local/share/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:270 +0x90

                                              rax    0xca
                                                                     rbx    0x0
                                                                                           rcx    0x47d303
                    rdx    0x0
                                          rdi    0x256a300
                                                                      rsi    0x80
                                                                                             rbp    0xc00007ff28
                          rsp    0xc00007fee0
                                                         r8     0x0
                                                                               r9     0x0
                                                                                                     r10    0x0
                         r11    0x286
                                                 r12    0x7ffd97e9f638
                                                                                  r13    0x0
                                                                                                        r14    0xc000007c00
                                     r15    0x7fffffffffff
                                                                      rip    0x47d301
                                                                                                 rflags 0x286
                       cs     0x33
                                              fs     0x0
                                                                    gs     0x0
                                                                                          [context deadline exceeded]
                               FAIL: testdata/scripts/edgecasesumask.txtar:21: test timed out while running command

                             FAIL
                                 FAIL	github.com/twpayne/chezmoi/v2/internal/cmd	540.190s
                                                                                                ok  	  github.com/twpayne/chezmoi/v2/internal/cmds/generate-install.sh	0.012s
                                                                              ok  	github.com/twpayne/chezmoi/v2/internal/cmds/lint-commit-messages	0.002s
                                                              ok  	github.com/twpayne/chezmoi/v2/internal/cmds/lint-whitespace	  0.003s
                                              FAIL
                                                  %

@twpayne
Copy link
Owner Author

twpayne commented Jul 1, 2024

Thanks for the testing. It looks like the tempDir functionality is working as intended.

For the error messages, I suspect that a test timed out. The way that chezmoi's tests are currently constructed means that if any test fails in a group then messages from all tests in the group are output. Hence the verbose output from go test ./...

What's the output of chezmoi doctor on your system?

@kjkent
Copy link

kjkent commented Jul 1, 2024

Gotcha, that tracks.

with the same executable, chezmoi doctor:

λ ./chezmoi doctor
RESULT    CHECK                       MESSAGE
warning   version                     dev, commit 671e433998d447058b2dd62820ce925b8e0e1b78, built at 2024-07-01T22:18:41Z
warning   latest-version              v2.49.1
ok        os-arch                     linux/amd64 (Arch Linux)
ok        uname                       Linux kdes 6.9.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 28 Jun 2024 04:32:50 +0000 x86_64 GNU/Linux
ok        go-version                  go1.22.4 (gc)
ok        executable                  ~/sync/dev/linux/chezmoi/chezmoi
ok        upgrade-method              replace-executable
ok        config-file                 ~/.config/chezmoi/chezmoi.toml, last modified 2024-07-01T23:39:49+01:00
warning   source-dir                  ~/.local/share/chezmoi is a git working tree (dirty)
ok        suspicious-entries          no suspicious entries
warning   working-tree                ~/.local/share/chezmoi is a git working tree (dirty)
ok        dest-dir                    ~ is a directory
warning   umask                       027
ok        cd-command                  found /usr/bin/zsh
ok        cd-args                     /usr/bin/zsh
info      diff-command                not set
ok        edit-command                found /usr/bin/nvim
ok        edit-args                   /usr/bin/nvim
ok        git-command                 found /usr/bin/git, version 2.45.2
ok        merge-command               found /usr/bin/vimdiff
ok        shell-command               found /usr/bin/zsh
ok        shell-args                  /usr/bin/zsh
info      age-command                 age not found in $PATH
ok        gpg-command                 found /usr/bin/gpg, version 2.4.5
info      pinentry-command            not set
info      1password-command           op not found in $PATH
info      bitwarden-command           bw not found in $PATH
info      bitwarden-secrets-command   bws not found in $PATH
info      dashlane-command            dcli not found in $PATH
info      doppler-command             doppler not found in $PATH
info      gopass-command              gopass not found in $PATH
info      keepassxc-command           keepassxc-cli not found in $PATH
info      keepassxc-db                not set
info      keeper-command              keeper not found in $PATH
info      lastpass-command            lpass not found in $PATH
info      pass-command                pass not found in $PATH
info      passhole-command            ph not found in $PATH
info      rbw-command                 rbw not found in $PATH
info      vault-command               vault not found in $PATH
info      vlt-command                 vlt not found in $PATH
info      secret-command              not set

All looks standard, except perhaps my umask 027? I have this set for non-root users as I find it simplifies perms. root's umask is 022. /tmp has perms 1777, and I see a few chezmoi-test dirs in there (and one chezmoi-edit from like 4pm today, so with the old build) with perms 0700

Do the tests read local user config? If so, I wonder if me saving the tmpDir config mid-test derailed it. I'll run it again

@kjkent
Copy link

kjkent commented Jul 1, 2024

Same result. Reading the timed-out test above, it makes sense where, it's timing out on edgecasesumask.txtar, line 21:

exec chezmoi apply --dry-run $HOME${/}.file

I'm unfamiliar with the particulars such as ${/}, but I've ran chezmoi apply with and without --dry-run, and it returns without issue, and the changes are applied as expected.

@twpayne
Copy link
Owner Author

twpayne commented Jul 1, 2024

All looks standard, except perhaps my umask 027? I have this set for non-root users as I find it simplifies perms. root's umask is 022. /tmp has perms 1777, and I see a few chezmoi-test dirs in there (and one chezmoi-edit from like 4pm today, so with the old build) with perms 0700

It's normal that a few temporary directories/files will leak out. chezmoi can only clean up after itself if it exits in a controlled fashion, which isn't always the case.

Looking now at the test failure output, the test failure is in a umask-related test. chezmoi's tests only cover umasks 002 and 022 since these are the most common, and it's highly likely that your umask of 027 is breaking the tests. Unfortunately, umask is a global (process-specific) variable which makes hermetic testing tricky.

Do the tests read local user config? If so, I wonder if me saving the tmpDir config mid-test derailed it. I'll run it again

The tests should not read any local user config. They should be hermetic.

I'll investigate the umask issue separately.

@kjkent
Copy link

kjkent commented Jul 1, 2024

Great, no worries -- for what it's worth, rerunning the tests on a build of v2.49.1 seems to be going the same way.

Down the line, if you'd like me to re-test anything with my odd umask, I'm more than happy to. Apologies I can't offer actual code right now; I would like to learn go, but I'm a bit time constrained to be much use.

@twpayne twpayne merged commit 2808e7c into master Jul 1, 2024
23 checks passed
@twpayne twpayne deleted the fix-3846 branch July 1, 2024 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chezmoi edit <target file> hardlink functionality breaks across btrfs subvolumes
2 participants