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

Ugly error when running 'ipfs add ****' without initializing ipfs #796

Closed
whyrusleeping opened this issue Feb 19, 2015 · 2 comments
Closed
Labels
kind/bug A bug in existing code (including security flaws) topic/commands Topic commands

Comments

@whyrusleeping
Copy link
Member

Going through all the fun 'new user' stuff, and decided to not initialize ipfs, just for kicks.
echo "test" > file && ipfs add file resulted in the following:

whyrusleeping@alarm ~/g/s/g/j/go-ipfs> ipfs add file
/home/whyrusleeping/gopkg/src/github.com/jbenet/go-ipfs/util/util.go:46 (0xe1608)
    ErrCast: debug.PrintStack()
/home/whyrusleeping/gopkg/src/github.com/jbenet/go-ipfs/core/commands/add.go:117 (0xb3848)
    func.003: res.SetError(u.ErrCast(), cmds.ErrNormal)
/home/whyrusleeping/gopkg/src/github.com/jbenet/go-ipfs/cmd/ipfs/main.go:331 (0x159dc)
    callCommand: cmd.PostRun(req, res)
/home/whyrusleeping/gopkg/src/github.com/jbenet/go-ipfs/cmd/ipfs/main.go:165 (0x144c4)
    (*cmdInvocation).Run: res, err := callCommand(ctx, i.req, Root, i.cmd)
/home/whyrusleeping/gopkg/src/github.com/jbenet/go-ipfs/cmd/ipfs/main.go:136 (0x1407c)
    main: output, err := invoc.Run(ctx)
/home/whyrusleeping/go/src/runtime/proc.go:86 (0x43b04)
    main: main_main()
/home/whyrusleeping/go/src/runtime/asm_arm.s:1364 (0x69a20)
    goexit: RET
Error: cast error

When I would expect:

Error: ipfs not initialized, please run 'ipfs init'

cc @mappum

@whyrusleeping whyrusleeping added kind/bug A bug in existing code (including security flaws) topic/commands Topic commands labels Feb 19, 2015
@whyrusleeping
Copy link
Member Author

closed with #797

@jbenet
Copy link
Member

jbenet commented Feb 20, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) topic/commands Topic commands
Projects
None yet
Development

No branches or pull requests

2 participants