{"action":"created","issue":{"url":"https://api.github.com/repos/wp-cli/export-command/issues/40","repository_url":"https://api.github.com/repos/wp-cli/export-command","labels_url":"https://api.github.com/repos/wp-cli/export-command/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/wp-cli/export-command/issues/40/comments","events_url":"https://api.github.com/repos/wp-cli/export-command/issues/40/events","html_url":"https://github.com/wp-cli/export-command/issues/40","id":340448410,"node_id":"MDU6SXNzdWUzNDA0NDg0MTA=","number":40,"title":"can't set with_attachments to FALSE","user":{"login":"drzraf","id":1169926,"node_id":"MDQ6VXNlcjExNjk5MjY=","avatar_url":"https://avatars0.githubusercontent.com/u/1169926?v=4","gravatar_id":"","url":"https://api.github.com/users/drzraf","html_url":"https://github.com/drzraf","followers_url":"https://api.github.com/users/drzraf/followers","following_url":"https://api.github.com/users/drzraf/following{/other_user}","gists_url":"https://api.github.com/users/drzraf/gists{/gist_id}","starred_url":"https://api.github.com/users/drzraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drzraf/subscriptions","organizations_url":"https://api.github.com/users/drzraf/orgs","repos_url":"https://api.github.com/users/drzraf/repos","events_url":"https://api.github.com/users/drzraf/events{/privacy}","received_events_url":"https://api.github.com/users/drzraf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-12T00:20:49Z","updated_at":"2018-07-13T12:33:50Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Followup of #16\r\nThere was introduced `--with_attachments`. During the course of the PR, validation/casting disappeared and argument was handled that way:\r\n```\r\n+\t\t$this->export_args['with_attachments'] = WP_CLI\\Utils\\get_flag_value(\r\n+\t\t\t$assoc_args,\r\n+\t\t\t'with_attachments',\r\n+\t\t\t$defaults['with_attachments']\r\n+\t\t);\r\n```\r\n\r\nBut [on the other side](https://github.com/wp-cli/export-command/blob/master/src/WP_Export_Query.php#L199), the code test for **boolean** value.\r\n== we can't force `--with_attachment` to FALSE whatever the value passed would be (`=0, =no, =false, ...`)\r\n\r\nRef to [get_flag_value](https://github.com/wp-cli/wp-cli/blob/master/php/utils.php#L742)"},"comment":{"url":"https://api.github.com/repos/wp-cli/export-command/issues/comments/404820328","html_url":"https://github.com/wp-cli/export-command/issues/40#issuecomment-404820328","issue_url":"https://api.github.com/repos/wp-cli/export-command/issues/40","id":404820328,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDgyMDMyOA==","user":{"login":"schlessera","id":83631,"node_id":"MDQ6VXNlcjgzNjMx","avatar_url":"https://avatars1.githubusercontent.com/u/83631?v=4","gravatar_id":"","url":"https://api.github.com/users/schlessera","html_url":"https://github.com/schlessera","followers_url":"https://api.github.com/users/schlessera/followers","following_url":"https://api.github.com/users/schlessera/following{/other_user}","gists_url":"https://api.github.com/users/schlessera/gists{/gist_id}","starred_url":"https://api.github.com/users/schlessera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schlessera/subscriptions","organizations_url":"https://api.github.com/users/schlessera/orgs","repos_url":"https://api.github.com/users/schlessera/repos","events_url":"https://api.github.com/users/schlessera/events{/privacy}","received_events_url":"https://api.github.com/users/schlessera/received_events","type":"User","site_admin":false},"created_at":"2018-07-13T12:33:50Z","updated_at":"2018-07-13T12:33:50Z","author_association":"MEMBER","body":"@drzraf The way to negate a flag is to add `no-` in front of it:\r\n```\r\n--on-with_attachments\r\n```\r\n\r\nThis is part of the default Synopsis handling of WP-CLI."}}
{"actor":{"display_login":"schlessera"}}