{"action":"closed","issue":{"url":"https://api.github.com/repos/mitchellh/packer/issues/3677","repository_url":"https://api.github.com/repos/mitchellh/packer","labels_url":"https://api.github.com/repos/mitchellh/packer/issues/3677/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/packer/issues/3677/comments","events_url":"https://api.github.com/repos/mitchellh/packer/issues/3677/events","html_url":"https://github.com/mitchellh/packer/issues/3677","id":163974957,"number":3677,"title":"Packer's command line parsing module doesn't appear to reflect the behavior of the documentation","user":{"login":"dragon788","id":487774,"avatar_url":"https://avatars.githubusercontent.com/u/487774?v=3","gravatar_id":"","url":"https://api.github.com/users/dragon788","html_url":"https://github.com/dragon788","followers_url":"https://api.github.com/users/dragon788/followers","following_url":"https://api.github.com/users/dragon788/following{/other_user}","gists_url":"https://api.github.com/users/dragon788/gists{/gist_id}","starred_url":"https://api.github.com/users/dragon788/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dragon788/subscriptions","organizations_url":"https://api.github.com/users/dragon788/orgs","repos_url":"https://api.github.com/users/dragon788/repos","events_url":"https://api.github.com/users/dragon788/events{/privacy}","received_events_url":"https://api.github.com/users/dragon788/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mitchellh/packer/labels/core","name":"core","color":"eb6420"},{"url":"https://api.github.com/repos/mitchellh/packer/labels/question","name":"question","color":"cc317c"},{"url":"https://api.github.com/repos/mitchellh/packer/labels/waiting-reply","name":"waiting-reply","color":"5319e7"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-06T00:28:01Z","updated_at":"2016-09-07T14:00:07Z","closed_at":"2016-09-07T14:00:07Z","body":"Packer's command line parsing module doesn't appear to reflect the behavior of the documentation. In the documentation it mixes space ``` ``` and equals ```=``` as valid separators for the -only -var -var-file and possibly other options. I attempted to validate a template with a var-file and if I used the ```-var-file=  vars.json``` syntax it failed to find the file (seems to drop the extension), but if I used the ```-var-file vars.json``` it was correctly found.\r\n\r\nThis may be a pathing issue in the helpers function, or it is detecting it incorrectly based on the presence or absence of the equals ```=```.\r\n\r\nPacker's documentation (built in):\r\n```\r\nUsage: packer validate [options] TEMPLATE\r\n\r\n...\r\nOptions:\r\n\r\n  -syntax-only           Only check syntax. Do not verify config of the template.\r\n  -except=foo,bar,baz    Validate all builds other than these\r\n  -only=foo,bar,baz      Validate only these builds\r\n  -var 'key=value'       Variable for templates, can be used multiple times.\r\n  -var-file=path         JSON file containing user variables.\r\n```\r\n\r\nDescribe the problem and include the following information:\r\n\r\n- Packer Version = 0.10.1\r\n- Host platform = Windows 10 (PowerShell used as cmd interpreter)\r\n- Debug log output from `PACKER_LOG=1 packer validate -var-file=vars.json template.json`.\r\n- This includes runs both with and without equals ```=```\r\nhttps://gist.github.com/dragon788/163aa6b8221ba9108864ca01a8592358\r\n- The _simplest example template and scripts_ needed to reproduce the bug.\r\n ```git clone https://github.com/boxcutter/ubuntu && packer validate -var-file=ubuntu16.04-desktop.json ubuntu.json```\r\n"}}
{"actor":{"display_login":"rickard-von-essen"}}