Comments (4)
Thanks for reporting this.
I need more information to be able to reproduce this:
- Is there anything special about any of the path elements in
~/.config/helix/themes/ayu_custom.toml
, for example, are you using.chezmoiexternal
orexternal_
? - What is the output of
chezmoi dump ~/.config/helix
?
from chezmoi.
Hey thanks for getting back to me @twpayne.
I manually worked around this issue by doing the copy myself, so i can't reproduce it anymore with the same commands, but I think i narrowed down the issue to doing chemoi add on a file in a directory that doesn't exist in the source...
i.e.
$ mkdir ~/.config/helix/t/
$ cp ~/.config/helix/themes/ayu_custom.toml ~/.config/helix/t/custom.toml
$ chezmoi add ~/.config/helix/t/custom.toml
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x11 pc=0x10356e890]
goroutine 1 [running]:
github.com/twpayne/chezmoi/v2/internal/chezmoi.(*SourceState).Add(0x140001aed80, {0x1045d5d60, 0x14000588500}, {0x1045d30b0, 0x1400045acf0}, {0x1045d5ec0, 0x140002f6ba0}, 0x14000637740, 0x140007b5868)
github.com/twpayne/chezmoi/v2/internal/chezmoi/sourcestate.go:420 +0x1540
github.com/twpayne/chezmoi/v2/internal/cmd.(*Config).runAddCmd(0x140003dd008, 0x14000254908?, {0x1400042b1c0?, 0x0?, 0x0?}, 0x140001aed80)
github.com/twpayne/chezmoi/v2/internal/cmd/addcmd.go:179 +0x280
github.com/twpayne/chezmoi/v2/internal/cmd.(*Config).newAddCmd.(*Config).makeRunEWithSourceState.func2(0x14000254908, {0x1400042b1c0, 0x1, 0x1})
github.com/twpayne/chezmoi/v2/internal/cmd/config.go:1533 +0x88
github.com/spf13/cobra.(*Command).execute(0x14000254908, {0x1400042b190, 0x1, 0x1})
github.com/spf13/[email protected]/command.go:983 +0x840
github.com/spf13/cobra.(*Command).ExecuteC(0x14000254308)
github.com/spf13/[email protected]/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/[email protected]/command.go:1039
github.com/twpayne/chezmoi/v2/internal/cmd.(*Config).execute(0x140007b5dd8?, {0x1400003c340, 0x2, 0x2})
github.com/twpayne/chezmoi/v2/internal/cmd/config.go:1202 +0x70
github.com/twpayne/chezmoi/v2/internal/cmd.runMain({{0x10427d790, 0x6}, {0x10427e9e0, 0x28}, {0x10427e720, 0x14}, {0x10427e638, 0x8}}, {0x1400003c340, 0x2, ...})
github.com/twpayne/chezmoi/v2/internal/cmd/cmd.go:269 +0x18c
github.com/twpayne/chezmoi/v2/internal/cmd.Main({{0x10427d790, 0x6}, {0x10427e9e0, 0x28}, {0x10427e720, 0x14}, {0x10427e638, 0x8}}, {0x1400003c340?, 0x10303d468?, ...})
github.com/twpayne/chezmoi/v2/internal/cmd/cmd.go:105 +0x54
main.main()
github.com/twpayne/chezmoi/v2/main.go:24 +0xd8
$ mkdir ~/.local/share/chezmoi/dot_config/exact_helix/t/
$ chezmoi add ~/.config/helix/t/custom.toml
works fine here ^
Fails with seg fault. my source path looks like ~/.local/share/chezmoi/dot_config/exact_helix/
i wonder if it has to do with exact_helix
adding a new file + dir into that?
to you questions:
- nothing special. I don't use externals.
- not sure this is needed given the repro details above... it just spits out a json dump of that directory...
from chezmoi.
I'd guess that the sourceStateDir is nil here:
chezmoi/internal/chezmoi/sourcestate.go
Line 420 in f490429
from chezmoi.
Thank you for the extra information. It's the exact_
directory that triggers the bug. I can reproduce this now.
from chezmoi.
Related Issues (20)
- Allow specify apply order HOT 5
- Allow `chezmoi apply` to change the scope of application. HOT 1
- Unable to add .config files - chezmoi: git: fork/exec /usr/bin/git: argument list too long HOT 5
- Several issues installing on a vanilla machine
- Apply .tmpl files in git repos declared in .chezmoiexternal HOT 2
- Segfault `.chezmoiexternal.toml` Has Headers Without Bodies HOT 1
- Run script when external changes HOT 3
- Automatically add new files for monitored folder? HOT 4
- Manage related files by logical group HOT 5
- Skip template interpolation for run_once_, run_onchange_ script templates HOT 5
- Add files within a symlinked directory HOT 1
- Chezmoi is not purging unmanaged files with externals HOT 2
- chezmoi partially applying HOT 3
- List files that are being applied when verbose option is specified HOT 1
- Visual colored "tree" of managed files HOT 1
- .chezmoi.username on Android is wrong HOT 4
- chezmoi quick start documentation is out of date HOT 1
- Chezmoi dont seem to read from my .chezmoiignore file HOT 5
- chezmoi status falsely reports modified if textconv is used HOT 3
- Multiple source directories HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chezmoi.