Commit 97c56347 authored by Grégoire Pineau's avatar Grégoire Pineau

Better error reporting when a config key in template is Unknown

This patch will allow to fix the following bug much faster:

```
1 error(s) occurred:

* Unknown configuration key: output_directory
```

Related configuration:

```
"output_directory ": "build/sl_base/",
```

After the patch, the error reporting will be:

```
1 error(s) occurred:

* Unknown configuration key: "output_directory¤"
```
parent 1b07d7eb
......@@ -33,7 +33,7 @@ func CheckUnusedConfig(md *mapstructure.Metadata) *packer.MultiError {
for _, unused := range md.Unused {
if unused != "type" && !strings.HasPrefix(unused, "packer_") {
errs = append(
errs, fmt.Errorf("Unknown configuration key: %s", unused))
errs, fmt.Errorf("Unknown configuration key: %q", unused))
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment