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

Unknown command locally, but works in try docopt #47

Open
mastoj opened this issue Oct 26, 2017 · 1 comment
Open

Unknown command locally, but works in try docopt #47

mastoj opened this issue Oct 26, 2017 · 1 comment

Comments

@mastoj
Copy link

mastoj commented Oct 26, 2017

I have the following docopt spec:

poisson

	Usage:
		poisson
		poisson start --project=<project> [--norestore]
		poisson populatebq --project=<project>
		poisson populatemongo --project=<project>

	Options:
		-h --help			Show this screen.
		--version			Show version.
		--project=<project>	Project id.
		--norestore			If specified restore of db will not take place.

Note that this is the first time using docopt, so I could probably do something differently. With that said. When I try to run the app that has this specification with the following line:

go run main.go start --norestore --project=projectname

It fails with unknown command. If I remove the last line --norestore... from the spec if works fine. The first one also works on try docopt: http://try.docopt.org/?doc=poisson%0D%0A%0D%0A%09Usage%3A%0D%0A%09%09poisson%0D%0A%09%09poisson+start+--project%3D%3Cproject%3E+%5B--norestore%5D%0D%0A%09%09poisson+populatebq+--project%3D%3Cproject%3E%0D%0A%09%09poisson+populatemongo+--project%3D%3Cproject%3E%0D%0A%0D%0A%09Options%3A%0D%0A%09%09-h+--help%09%09%09Show+this+screen.%0D%0A%09%09--version%09%09%09Show+version.%0D%0A%09%09--project%3D%3Cproject%3E%09Project+id.%0D%0A%09%09--norestore%09%09%09If+specified+restore+of+db+will+not+take+place.&argv=start+--project%3Dasd+--norestore

@ghostsquad
Copy link

Can you post reproducible code?

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

No branches or pull requests

2 participants