{"action":"closed","issue":{"url":"https://api.github.com/repos/docker/docker/issues/7396","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/7396/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/7396/comments","events_url":"https://api.github.com/repos/docker/docker/issues/7396/events","html_url":"https://github.com/docker/docker/issues/7396","id":39391893,"number":7396,"title":"mflag doesn't treat certain odd arguments properly","user":{"login":"cyphar","id":2888411,"avatar_url":"https://avatars.githubusercontent.com/u/2888411?v=3","gravatar_id":"","url":"https://api.github.com/users/cyphar","html_url":"https://github.com/cyphar","followers_url":"https://api.github.com/users/cyphar/followers","following_url":"https://api.github.com/users/cyphar/following{/other_user}","gists_url":"https://api.github.com/users/cyphar/gists{/gist_id}","starred_url":"https://api.github.com/users/cyphar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyphar/subscriptions","organizations_url":"https://api.github.com/users/cyphar/orgs","repos_url":"https://api.github.com/users/cyphar/repos","events_url":"https://api.github.com/users/cyphar/events{/privacy}","received_events_url":"https://api.github.com/users/cyphar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/exp/expert","name":"exp/expert","color":"3B8686"},{"url":"https://api.github.com/repos/docker/docker/labels/kind/enhancement","name":"kind/enhancement","color":"E8CAAF"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2014-08-04T05:37:23Z","updated_at":"2016-08-11T21:12:13Z","closed_at":"2016-08-11T21:12:12Z","body":"For the following few arguments, `mflag` doesn't act as expected (i.e. producing an error that doesn't indicate the actual problem which could cause very odd behaviour):\r\n\r\n```bash\r\n$ docker run \"-a stdout\" ubuntu bash\r\ninvalid value \"ubuntu\" for flag -a: Unsupported stream name: ubuntu\r\n# the error should be something like \"flag provided but not defined: '-a stdout'\"\r\n# if you have an image with the name `stdout`, you would be surprised that it would start the wrong container or not work.\r\n$ docker ps -a \"-n 3\"\r\nflag needs an argument: -n\r\n# the error should be something like \"flag provided but not defined: '-n 3'\"\r\n```\r\n\r\n... and so on.\r\n\r\nHowever, the following commands produce the correct error:\r\n```bash\r\n$ docker inspect \"--format {{.Config.Cmd}}\" <container>\r\nflag provided but not defined: --format {{.Config.Cmd}}\r\n# ...\r\n$ docker inspect \"-f {{.Config.Cmd}}\" <container>\r\nflag provided but not defined: -f {{.Config.Cmd}}\r\n# ...\r\n```\r\n\r\nWhich makes this even more puzzling."}}
{"actor":{"display_login":"cpuguy83"}}