Skip to content

Error when no makefile found #2

Description

@raymondbutcher

It panics when it should error normally.

raymond@raymond-desktop:~$ remake
make: *** No targets specified and no makefile found.  Stop.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x4c771f]

goroutine 7 [running]:
github.com/raymondbutcher/remake/makedb.(*Database).GetTarget(0xc000104da8, {0x0, 0xc00000c108})
        /home/runner/work/remake/remake/makedb/database.go:98 +0x5f
github.com/raymondbutcher/remake/makedb.(*Database).GetPendingTargets(0xc00002a480, {0x0, 0x21cd6b0}, {0x1bd5a80ba3af8, 0xc000104de8, 0x5ba680})
        /home/runner/work/remake/remake/makedb/database.go:108 +0x55
github.com/raymondbutcher/remake/makecmd.(*Cmd).getRemaining(0xc00002a480)
        /home/runner/work/remake/remake/makecmd/cmd.go:127 +0x3e
github.com/raymondbutcher/remake/makecmd.(*Cmd).UpdateProgress(0xc00002a480)
        /home/runner/work/remake/remake/makecmd/cmd.go:93 +0x53
github.com/raymondbutcher/remake/makecmd.(*Cmd).StartGraceMode(0xc00002a480, 0x0, 0xc0000780c0, 0xc000078180)
        /home/runner/work/remake/remake/makecmd/grace.go:82 +0x2fc
main.remake({0x0, 0x0}, 0x0)
        /home/runner/work/remake/remake/main.go:105 +0x7a
created by main.main
        /home/runner/work/remake/remake/main.go:88 +0x414

Activity

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

Metadata

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