mitchellh/packer — pull request #218 by jstamerj (2013-07-25 16:41:46+00:00)
Title: Fixes for running on windows

When running VBoxManage in windows, the output of each line ends with a carriage return and line feed (not just a line feed). This causes the parsing of the output in virtualbox/driver.go to malfunction and think that the VM is not running when it is, in fact, still running...which leads to more failures.

Also, in communicator/ssh/communicator.go, path/filepath is used to parse directory / filename from a path string. When running with Windows GO, this returns backslash separators in the directory name. For example, filepath.Dir("/tmp/script.sh") returns "\tmp". When uploading to a unix target host, this does not work. I fixed this by converting separator characters in the directory to forward slash via a call to filepath.ToSlash().