{"action":"closed","issue":{"url":"https://api.github.com/repos/hashicorp/packer/issues/5704","repository_url":"https://api.github.com/repos/hashicorp/packer","labels_url":"https://api.github.com/repos/hashicorp/packer/issues/5704/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/packer/issues/5704/comments","events_url":"https://api.github.com/repos/hashicorp/packer/issues/5704/events","html_url":"https://github.com/hashicorp/packer/issues/5704","id":282135937,"number":5704,"title":"Provide better error message when failing to parse core config","user":{"login":"jurajseffer","id":2191852,"avatar_url":"https://avatars1.githubusercontent.com/u/2191852?v=4","gravatar_id":"","url":"https://api.github.com/users/jurajseffer","html_url":"https://github.com/jurajseffer","followers_url":"https://api.github.com/users/jurajseffer/followers","following_url":"https://api.github.com/users/jurajseffer/following{/other_user}","gists_url":"https://api.github.com/users/jurajseffer/gists{/gist_id}","starred_url":"https://api.github.com/users/jurajseffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jurajseffer/subscriptions","organizations_url":"https://api.github.com/users/jurajseffer/orgs","repos_url":"https://api.github.com/users/jurajseffer/repos","events_url":"https://api.github.com/users/jurajseffer/events{/privacy}","received_events_url":"https://api.github.com/users/jurajseffer/received_events","type":"User","site_admin":false},"labels":[{"id":142214477,"url":"https://api.github.com/repos/hashicorp/packer/labels/core","name":"core","color":"eb6420","default":false},{"id":33051540,"url":"https://api.github.com/repos/hashicorp/packer/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-14T15:20:07Z","updated_at":"2017-12-14T19:27:59Z","closed_at":"2017-12-14T19:27:59Z","author_association":"NONE","body":"Packer 1.1.3\r\n\r\nI have defined `PACKER_CONFIG` environment variable inside a bash script that had the path to the build configuration only to receive this message:\r\n```\r\n2017/12/14 11:58:16 Attempting to open config file: /project/build.json\r\nError loading configuration: \r\n\r\njson: cannot unmarshal array into Go struct field config.Builders of type map[string]string\r\n```\r\n\r\nI wasn't aware `PACKER_CONFIG` was being used by Packer for core configuration. The above error message looked as if Packer was trying to map my build configuration into its internal config so it took me a while to figure out my env var is actually providing a path to \"core\" packer config, not the build one.\r\n\r\nCould we improve the debug messages to explicitly mention that `PACKER_CONFIG` env var is defined and that \"core\" configuration is being read and mapped, rather than just generic \"Attempting to open config file\"?"}}
{"actor":{"display_login":"mwhooker"}}