{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/packer/issues/2173","labels_url":"https://api.github.com/repos/mitchellh/packer/issues/2173/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/packer/issues/2173/comments","events_url":"https://api.github.com/repos/mitchellh/packer/issues/2173/events","html_url":"https://github.com/mitchellh/packer/pull/2173","id":85008076,"number":2173,"title":"Skip *.ignore files to improve Chocolatey package for Windows","user":{"login":"StefanScherer","id":207759,"avatar_url":"https://avatars.githubusercontent.com/u/207759?v=3","gravatar_id":"","url":"https://api.github.com/users/StefanScherer","html_url":"https://github.com/StefanScherer","followers_url":"https://api.github.com/users/StefanScherer/followers","following_url":"https://api.github.com/users/StefanScherer/following{/other_user}","gists_url":"https://api.github.com/users/StefanScherer/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanScherer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanScherer/subscriptions","organizations_url":"https://api.github.com/users/StefanScherer/orgs","repos_url":"https://api.github.com/users/StefanScherer/repos","events_url":"https://api.github.com/users/StefanScherer/events{/privacy}","received_events_url":"https://api.github.com/users/StefanScherer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-04T09:40:55Z","updated_at":"2015-06-04T14:19:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mitchellh/packer/pulls/2173","html_url":"https://github.com/mitchellh/packer/pull/2173","diff_url":"https://github.com/mitchellh/packer/pull/2173.diff","patch_url":"https://github.com/mitchellh/packer/pull/2173.patch"},"body":"I'm the maintainer of the Chocolatey package of [packer](https://chocolatey.org/packages/packer) for Windows.  Currently I'm working on an improved Chocolatey package for the next release of packer. There is a small issue to get the best exprience for the user.  Chocolatey now has more control to install the packer.zip and uninstall the package in a very clean way.\r\n\r\nChocolatey can redirect exe files to put them easily into the user's PATH. For packer only the `packer.exe` needs this redirect.  All the other exe files are discovered by packer itself.\r\n\r\nTo suppress the redirects for the many other exe files to keep the user's setup more clean I have to add `*.ignore` files into the Chocolatey package.\r\n\r\nWith the current packer 0.7.5 the discovery also finds all of these `*.ignore` files and takes them as the file name of the plugin.  Starting that empty file fails and packer aborts:\r\n\r\n``` \r\n2015/06/04 09:52:44 [INFO] Packer version: 0.7.5  9cd66feeacbd9cb318b72eb5ed59428c5b8c37ac+CHANGES\r\n2015/06/04 09:52:44 Packer Target OS/Arch: windows amd64\r\n2015/06/04 09:52:44 Built with Go Version: go1.3.3\r\n2015/06/04 09:52:44 [DEBUG] Discoverd plugin: amazon-chroot = C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer-builder-amazon-chroot.exe\r\n2015/06/04 09:52:44 [DEBUG] Discoverd plugin: amazon-chroot = C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer-builder-amazon-chroot.exe.ignore\r\n...\r\n2015/06/04 09:52:44 [DEBUG] Discoverd plugin: virtualbox-iso = C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer-builder-virtualbox-iso.exe\r\n2015/06/04 09:52:44 [DEBUG] Discoverd plugin: virtualbox-iso = C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer-builder-virtualbox-iso.exe.ignore\r\n...\r\n2015/06/04 09:52:44 [DEBUG] Discoverd plugin: shell = C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer-provisioner-shell.exe\r\n2015/06/04 09:52:44 [DEBUG] Discoverd plugin: shell = C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer-provisioner-shell.exe.ignore\r\n2015/06/04 09:52:44 Attempting to open config file: C:\\Users\\vagrant\\AppData\\Roaming\\packer.config\r\n2015/06/04 09:52:44 File doesn't exist, but doesn't need to. Ignoring.\r\n...\r\n2015/06/04 09:52:44 Setting cache directory: C:\\Users\\vagrant\\Documents\\ubuntu-vm\\packer_cache\r\n2015/06/04 09:52:44 Reading template: ubuntu1204.json\r\n2015/06/04 09:52:44 Skipping build 'vmware-iso' because not specified by -only.\r\n2015/06/04 09:52:44 Creating build: virtualbox-iso\r\n2015/06/04 09:52:44 Loading builder: virtualbox-iso\r\n2015/06/04 09:52:44 Creating plugin client for path: C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer-builder-virtualbox-iso.exe.ignore\r\n2015/06/04 09:52:44 Starting plugin: C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer-builder-virtualbox-iso.exe.ignore []string{\"C:\\\\ProgramData\\\\chocolatey\\\\lib\\\\packer\\\\tools\\\\packer-builder-virtualbox-iso.exe.ignore\"}\r\n2015/06/04 09:52:44 ui error: Failed to create build 'virtualbox-iso': \r\n\r\nfork/exec C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer-builder-virtualbox-iso.exe.ignore: %1 is not a valid Win32 application.\r\n2015/06/04 09:52:44 waiting for all plugin processes to complete...\r\n```\r\n\r\nWith this fix packer just skips all `*.ignore` files while discovering packer plugins. With this patch packer works fine:\r\n\r\n```\r\n2015/06/04 11:07:31 [INFO] Packer version: 0.7.5  \r\n2015/06/04 11:07:31 Packer Target OS/Arch: windows amd64\r\n2015/06/04 11:07:31 Built with Go Version: go1.4.2\r\n2015/06/04 11:07:31 [DEBUG] Discovered plugin: amazon-chroot = C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer-builder-amazon-chroot.exe\r\n2015/06/04 11:07:31 [DEBUG] Discovered plugin: amazon-ebs = C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer-builder-amazon-ebs.exe\r\n...\r\n2015/06/04 11:07:31 [DEBUG] Discovered plugin: virtualbox-iso = C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer-builder-virtualbox-iso.exe\r\n2015/06/04 11:07:31 [DEBUG] Discovered plugin: virtualbox-ovf = C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer-builder-virtualbox-ovf.exe\r\n...\r\n...\r\n2015/06/04 11:07:31 Setting cache directory: C:\\Users\\vagrant\\Documents\\ubuntu-vm\\packer_cache\r\n2015/06/04 11:07:31 Loading builder: virtualbox-iso\r\n2015/06/04 11:07:31 Creating plugin client for path: C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer-builder-virtualbox-iso.exe\r\n2015/06/04 11:07:31 Starting plugin: C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer-builder-virtualbox-iso.exe []string{\"C:\\\\ProgramData\\\\chocolatey\\\\lib\\\\packer\\\\tools\\\\packer-builder-virtualbox-iso.exe\"}\r\n2015/06/04 11:07:31 Waiting for RPC address for: C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer-builder-virtualbox-iso.exe\r\n...\r\n```\r\n\r\n@mitchellh Looking forward to meet you at enterJS in two weeks!"},"comment":{"url":"https://api.github.com/repos/mitchellh/packer/issues/comments/108911913","html_url":"https://github.com/mitchellh/packer/pull/2173#issuecomment-108911913","issue_url":"https://api.github.com/repos/mitchellh/packer/issues/2173","id":108911913,"user":{"login":"mitchellh","id":1299,"avatar_url":"https://avatars.githubusercontent.com/u/1299?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchellh","html_url":"https://github.com/mitchellh","followers_url":"https://api.github.com/users/mitchellh/followers","following_url":"https://api.github.com/users/mitchellh/following{/other_user}","gists_url":"https://api.github.com/users/mitchellh/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchellh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchellh/subscriptions","organizations_url":"https://api.github.com/users/mitchellh/orgs","repos_url":"https://api.github.com/users/mitchellh/repos","events_url":"https://api.github.com/users/mitchellh/events{/privacy}","received_events_url":"https://api.github.com/users/mitchellh/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T14:19:07Z","updated_at":"2015-06-04T14:19:07Z","body":"@ferventcoder That would probably work well. "}}