devdash icon indicating copy to clipboard operation
devdash copied to clipboard

Crash on `devdash edit`

Open SebRut opened this issue 3 years ago • 2 comments

Hey, I just installed devdash on Manjaro linux using the devdash-bin AUR package. (https://aur.archlinux.org/packages/devdash-bin) Upon running devdash edit I get the following crash:

panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/Phantas0s/devdash/cmd.edit(0x13afc40, 0x0, 0x0)
	/home/hypnos/workspace/devdash/cmd/edit.go:29 +0x27c
github.com/Phantas0s/devdash/cmd.editCmd.func1(0xc00032e500, 0x13afc40, 0x0, 0x0)
	/home/hypnos/workspace/devdash/cmd/edit.go:19 +0x3f
github.com/spf13/cobra.(*Command).execute(0xc00032e500, 0x13afc40, 0x0, 0x0, 0xc00032e500, 0x13afc40)
	/home/hypnos/workspace/go/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0x1375180, 0x13819c0, 0x0, 0xc000062778)
	/home/hypnos/workspace/go/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	/home/hypnos/workspace/go/pkg/mod/github.com/spf13/[email protected]/command.go:897
github.com/Phantas0s/devdash/cmd.Execute()
	/home/hypnos/workspace/devdash/cmd/root.go:44 +0x31
main.main()
	/home/hypnos/workspace/devdash/devdash.go:6 +0x25

SebRut avatar Aug 09 '22 08:08 SebRut

Same issue here, also it seems devdash is not using the default file when running without the -c option

b4nst avatar Aug 09 '22 18:08 b4nst

Sorry for the late reply! It's because you need to give the path of the config file you want to edit as first argument. The error message is far from ideal however; I'll add a proper one :)

Phantas0s avatar Apr 10 '23 06:04 Phantas0s