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

Minio cli odd behavior after using cobra #89

Closed
harshavardhana opened this issue Jan 29, 2015 · 3 comments
Closed

Minio cli odd behavior after using cobra #89

harshavardhana opened this issue Jan 29, 2015 · 3 comments

Comments

@harshavardhana
Copy link
Member

Doesn't work

> ./minio --tls --key key.pem --cert cert.pem
flag needs an argument: --key

Usage: 
  minio [flags]

 Available Flags:
  -c, --cert="": cert file path
  -h, --help=false: help for minio
  -a, --http-address=":8080": http address
  -k, --key="": key file path
  -s, --storage-type="file": file,inmemory
  -t, --tls=false: enable tls

Works with following styles

./minio --tls -k key.pem -c cert.pem
2015/01/28 17:29:27 Starting HTTP Server on: :8080
 ./minio --tls --key=key.pem --cert=cert.pem
2015/01/28 17:30:07 Starting HTTP Server on: :8080

This is a odd behavior which didn't exist with Codegangsta, i guess the issue is cobra implementation which doesn't honor certain inputs under long form args

@harshavardhana
Copy link
Member Author

@fkautz ^^

@fkautz
Copy link
Contributor

fkautz commented Jan 29, 2015

Cobra uses pflags, which follows gnu opts syntax more closely. I don't see anywhere in pflags where we can adjust this behavior.

@fkautz
Copy link
Contributor

fkautz commented Jan 29, 2015

Reverted this.

@fkautz fkautz closed this as completed Jan 29, 2015
koolhead17 pushed a commit to koolhead17/minio that referenced this issue Jun 21, 2016
…ngful_error_responses_for_invalid_cases

Add more meaningful error responses for invalid cases
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 23, 2022
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

2 participants