Skip to content

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

Closed

Description

@whyrusleeping

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

Activity

  1. whyrusleeping commented on Feb 19, 2015

    @whyrusleeping
    MemberAuthor

    closed with #797

  2. jbenet commented on Feb 20, 2015

    @jbenet
    Member

    👍

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

    kind/bugA bug in existing code (including security flaws)topic/commandsTopic commands

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions