Commit Graph

5 Commits

Author SHA1 Message Date
Mitchell Hashimoto 528ae09c37 provisioner/shell: comment on why we return right away if advance == 0
/cc @mwhooker
2013-10-15 09:48:12 -10:00
Mitchell Hashimoto f673ca52ba provisoiner/shell: append only needs to add a byte for UnixReader 2013-10-15 09:40:47 -10:00
Matthew Hooker 104f5049a7 provisioner/shell: fix EOF detection
Fixes #507

The scanUnixLine function was erroneously returning empty lines when EOF
was reached.
This commit adds a test for the problem and changes the scanUnixLine
function to elide the trailing \n if no content was read.
2013-10-15 05:56:10 -07:00
Matthew Hooker 0d1b936f69 Fix UnixReader panic on empty lines.
Added a test for the failure.

Most of the scanner code looks like it's a modified version of
bufio.ScanLines, so I changed it to use that but always add a line feed.
2013-10-01 09:06:01 +00:00
Mitchell Hashimoto abbac36796 provisioner/shell: convert windows line endings to Unix [GH-277] 2013-09-20 10:22:43 -07:00