Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: logger cannot be nil #524

Closed
Eyjafjallajokull opened this issue Dec 19, 2015 · 5 comments
Closed

panic: logger cannot be nil #524

Eyjafjallajokull opened this issue Dec 19, 2015 · 5 comments
Assignees
Milestone

Comments

@Eyjafjallajokull
Copy link

hi, I'm trying to run drive under docker. Getting this error:

/data # drive init aw
panic: logger cannot be nil

goroutine 1 [running]:
github.com/odeke-em/drive/src.New(0xc2080522c0, 0x0, 0x1)
    /go/src/github.com/odeke-em/drive/src/commands.go:204 +0x6d0
main.(*initCmd).Run(0xcd27a0, 0xc20800a020, 0x1, 0x1, 0xc20800ae40)
    /go/src/github.com/odeke-em/drive/cmd/drive/main.go:168 +0x53
github.com/odeke-em/command.Run()
    /go/src/github.com/odeke-em/command/command.go:202 +0xad
github.com/odeke-em/command.ParseAndRun()
    /go/src/github.com/odeke-em/command/command.go:209 +0x20
main.main()
    /go/src/github.com/odeke-em/drive/cmd/drive/main.go:120 +0x21e8

goroutine 5 [syscall]:
os/signal.loop()
    /usr/lib/go/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
    /usr/lib/go/src/os/signal/signal_unix.go:27 +0x35

goroutine 6 [chan receive]:
main.func·001()
    /go/src/github.com/odeke-em/drive/cmd/drive/main.go:1543 +0x64
created by main.initContext
    /go/src/github.com/odeke-em/drive/cmd/drive/main.go:1548 +0x2e3

I'm using image built using:

FROM blang/golang-alpine
RUN apk update && apk add build-base && go get -u github.com/odeke-em/drive/cmd/drive
WORKDIR /data
ENTRYPOINT /go/bin/drive
@aerth
Copy link

aerth commented Dec 19, 2015

33b52c1 may break the whole thing @odeke-em

odeke-em added a commit that referenced this issue Dec 19, 2015
Fixes #524.

For commands such as `init`, the opts are nil so use
the vanilla logger for such cases and don't panic.
@odeke-em
Copy link
Owner

Thank you for reporting this and welcome to drive @Eyjafjallajokull. Oops, my apologies, I broke this a few hours ago. Fixing it up in a second.

@odeke-em
Copy link
Owner

@Eyjafjallajokull please get the latest from master by

$ go get -u github.com/odeke-em/drive/drive-gen && drive-gen

Addressed and auto-closed by PR #525.
Thank you for reporting this.

@Eyjafjallajokull
Copy link
Author

Wow! Well done! Thank you for this super fast response! 🍺

@odeke-em
Copy link
Owner

Thank you thank you 🍺 🍺 to you too!

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

No branches or pull requests

3 participants