Commit Graph

15 Commits

Author SHA1 Message Date
Adrien Delorme efd69aea2a
console: allow to use console when there are untyped vars (#9864)
* the var will simply be "unknown"
* add a test
2020-09-02 17:19:56 +02:00
Adrien Delorme 44616d3bff
refactor initialization out from packer configs + tests (#9627)
The initialization of packer core in JSON also validates that `null` variables were set, except in the case of `packer validate --syntax-only` , but after the refactor to allow to have all commands work with HCL2 and JSON this subtlety was lost.

This refactors the initialisation of the core in order to allow to have `packer validate --syntax-only` not error in case a variable is not set. Since these calls are refactored this works for HCL2 too.

fix #9478
2020-07-24 10:58:03 +02:00
Adrien Delorme bac9c74447
packer console for HCL2 (#9359) 2020-06-05 17:23:54 +02:00
Adrien Delorme 2f26168adc ConsoleCommand.ParseArgs: don't fail if no buildfile was passed 2020-05-14 12:21:42 +02:00
Adrien Delorme 14f18f4236 dont catch signals in console, as it seems unecessary for now 2020-05-12 11:29:09 +02:00
Adrien Delorme 22a36ef97a Move vars from Meta to cla args; this forces us to use it in GetConfigFromJSON which in turn forces us into updating console and validate 2020-05-12 11:24:22 +02:00
Megan Marsh 217dcbb97f golang 1.14 doesn't like calling NewFile on existing files. Port solution over from Terraform 2020-04-09 14:38:17 -07:00
Adrien Delorme d2964d59e9 document that the `-var-file` option still expects JSON files for now 2020-03-03 17:19:51 +01:00
Guido Dobboletta e79d62d006 Fix text 2019-08-08 13:22:59 -05:00
Megan Marsh f7bf80724c document what a REPL is 2019-06-10 11:39:42 -07:00
Megan Marsh 53a5e90d78
Update command/console.go
Co-Authored-By: Adrien Delorme <azr@users.noreply.github.com>
2019-06-10 11:38:29 -07:00
Megan Marsh 7cce3157a8
Update command/console.go
Co-Authored-By: Adrien Delorme <azr@users.noreply.github.com>
2019-06-10 11:38:14 -07:00
Megan Marsh 668e92f2ca add docs and the option to list variables from inside the console 2019-06-06 14:26:12 -07:00
Megan Marsh df916e805e borrow wrappedreadline workarounds from terraform and implement a similar check for piped commands; this makes the cli experience much cleaner 2019-06-06 13:26:07 -07:00
Megan Marsh b8ac1a800d implement a packer console analogous to the terraform console 2019-06-05 16:35:22 -07:00