Skip to content

user.Current may return err in some cases on Windows #122

Closed
@ceclin

Description

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x40 pc=0xae5ea2]

goroutine 1 [running]:
github.com/ferama/rospo/cmd.init.1()
        github.com/ferama/rospo/cmd/grabpubkey.go:15 +0x62

golang/go#37348

I think it is better to use os.Getwd or empty string as a fallback.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions