Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

Vendor command only works if gb is in PATH #685

Open
chris-martin opened this issue Jan 3, 2017 · 6 comments
Open

Vendor command only works if gb is in PATH #685

chris-martin opened this issue Jan 3, 2017 · 6 comments

Comments

@chris-martin
Copy link

I don't normally keep my Go bin directory in my PATH, so I tried to run gb vendor restore as ~/go/bin/gb vendor restore, and it fails in a rather confusing way:

$ ~/go/bin/gb vendor restore
FATAL: unknown command "vendor"
gb, a project based build tool for the Go programming language.

Usage:

        gb command [arguments]

The commands are:

        build       build a package
        doc         show documentation for a package or symbol
        env         print project environment variables
        generate    generate Go files by processing source
        info        info returns information about this project
        list        list the packages named by the importpaths
        test        test packages

Use "gb help [command]" for more information about a command.

Additional help topics:

        plugin      plugin information
        project     gb project layout

Use "gb help [topic]" for more information about that topic.
@davecheney
Copy link
Contributor

davecheney commented Jan 3, 2017 via email

@chris-martin
Copy link
Author

Oh, I see. Is there a reason gb-vendor can't work on its own instead of failing like this?

$ ~/go/bin/gb-vendor restore
FATAL: don't run this binary directly, it is meant to be run as 'gb vendor ...'

@davecheney
Copy link
Contributor

davecheney commented Jan 3, 2017 via email

@chris-martin
Copy link
Author

Alright, thanks for clarifying. Fine by me if you want to close the issue.

@coolaj86
Copy link

I have $HOME/go/bin in my $PATH.

I also have $GOPATH set to $HOME/go.

Yet I'm getting the same error. Any thoughts?

@davecheney
Copy link
Contributor

davecheney commented Sep 3, 2018 via email

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

No branches or pull requests

3 participants