Commit Graph

26 Commits

Author SHA1 Message Date
Matthew Hooker 048e316645
s/TargettedUi/TargetedUI/ 2017-03-29 12:44:42 -07:00
Ash Berlin 242ed49ecb Use bufio.Scanner in BasicUi.Ask so we can read whole lines
The previous version used fmt.Fscanln which sounds like it should scan
for a whole line, but it actually errors if there is more than a single
word/token given. You can see this here https://play.golang.org/p/1RYXdtPSbk

And looking at the only usage of this function in core it won't break
anything to change it to actually return whole lines instead.

    line, err := ui.Ask("[c] Clean up and exit, [a] abort without cleanup, or [r] retry step (build may fail even if retry succeeds)?")

Closes #4474
2017-01-29 14:10:14 +00:00
Emil Hessman bd425db546 packer: skip colored ui test if ui doesn't support colors
Fixes test failure on Windows.
2015-04-07 20:33:58 +02:00
Mitchell Hashimoto f3494fc77a fmt 2014-02-21 20:02:55 -08:00
Mitchell Hashimoto e2e4c9f671 packer: errors go to stderr [GH-868] 2014-02-21 18:29:15 -08:00
Mitchell Hashimoto ecf211ceed paker: tests for ColoredUi not showing color with env vars 2013-12-18 08:40:35 -08:00
Mitchell Hashimoto c7d7e2cf0f packer: don't change background color in UI 2013-11-19 21:31:54 -08:00
Mitchell Hashimoto 386d72c31a packer: no more asserts lib 2013-10-16 21:09:27 -10:00
Mitchell Hashimoto ba3344a322 packer: replace new lines with literal \n 2013-08-11 23:18:14 -07:00
Mitchell Hashimoto aa143a330b packer: TargettedUi properly targets machine-readable data 2013-08-11 19:08:08 -07:00
Mitchell Hashimoto 89be12ae21 packer: Add MachineReadableUi 2013-08-11 19:05:07 -07:00
Mitchell Hashimoto 03c10a9aa8 packer: renamed PrefixedUi to TargettedUi 2013-08-11 18:31:28 -07:00
Mitchell Hashimoto 02edc7579b packer: Rename ReaderWriterUi to BasicUi 2013-08-11 18:20:27 -07:00
Mitchell Hashimoto 7198936f7e packer: PrefixedUi properly prefixes each line of output 2013-07-02 12:28:25 -07:00
Mitchell Hashimoto e0f2bcf8a2 packer: Add "Ask" method to Ui to ask for input 2013-06-14 15:17:03 -07:00
Mitchell Hashimoto 0f98852d4d packer: Ui error output is red 2013-06-12 10:41:58 -07:00
Mitchell Hashimoto 079d6f4d43 packer: Introduce Cancel() method to Builder 2013-06-03 14:44:34 -07:00
Mitchell Hashimoto f041ebb2fd packer: ColoredUi 2013-06-03 13:35:43 -07:00
Mitchell Hashimoto edab952a68 packer: Add Message method to Ui 2013-06-03 11:30:38 -07:00
Mitchell Hashimoto 2788d29bd1 packer, packer/rpc: Update Ui to just take a message 2013-05-27 15:12:48 -07:00
Mitchell Hashimoto 2c4a873a5f packer: Add PrefixedUi 2013-05-21 13:20:51 -07:00
Mitchell Hashimoto 559777e5b7 packer: Ui automatically appends newline 2013-05-20 23:43:37 -07:00
Mitchell Hashimoto 95153413a6 packer: Ui has Error method 2013-05-08 15:12:48 -07:00
Mitchell Hashimoto f579ff05f2 Initial work on Build 2013-04-20 19:55:02 -06:00
Mitchell Hashimoto 91c524c7ec More environment testing 2013-03-24 14:47:59 -07:00
Mitchell Hashimoto ca93f645be packer.Ui tests 2013-03-24 14:31:18 -07:00