Skip to content

dp-cli fails to run on fresh setup #6

Description

@tomakado

If I run dp-cli on fresh machine, I get:

Error loading config: open /Users/tomakado/.config/dp-cli/config.json: no such file or directoryToolkit for managing Defer Panic articles and other stuff

Also, after I've written default(!) value to config's server key, I'm not able to log in:

➜ dp-cli login
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x8 pc=0x102c4a14c]

goroutine 1 [running]:
github.com/defer-panic/dp-cli/internal/auth.(*Service).GetAuthLink(0x102e69798?, {0x102e697d0, 0x1400010fc80})
	/Users/tomakado/go/pkg/mod/github.com/defer-panic/dp-cli@v0.3.1/internal/auth/service.go:24 +0x3c
github.com/defer-panic/dp-cli/internal/controller.(*authController).GetAuthLink(0x1400012a5b8, 0x0?, {0x0?, 0x0?, 0x0?})
	/Users/tomakado/go/pkg/mod/github.com/defer-panic/dp-cli@v0.3.1/internal/controller/auth.go:52 +0x70
github.com/spf13/cobra.(*Command).execute(0x14000137680, {0x103126440, 0x0, 0x0})
	/Users/tomakado/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:872 +0x4cc
github.com/spf13/cobra.(*Command).ExecuteC(0x1030e77c0)
	/Users/tomakado/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990 +0x338
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/tomakado/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918
github.com/defer-panic/dp-cli/cmd.Execute(...)
	/Users/tomakado/go/pkg/mod/github.com/defer-panic/dp-cli@v0.3.1/cmd/root.go:45
main.main()
	/Users/tomakado/go/pkg/mod/github.com/defer-panic/dp-cli@v0.3.1/main.go:10 +0x28

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions