Fix Appveyor Windows build and GitInfo path issue on Windows

This commit is contained in:
David Kassa
2017-01-01 16:16:58 -06:00
committed by Bjørn Erik Pedersen
parent 6e0f326b9d
commit 09a0af94f5
6 changed files with 62 additions and 6 deletions

View File

@@ -38,6 +38,11 @@ import (
// FilePathSeparator as defined by os.Separator.
const FilePathSeparator = string(filepath.Separator)
// Strips carriage returns from third-party / external processes (useful for Windows)
func normalizeExternalHelperLineFeeds(content []byte) []byte {
return bytes.Replace(content, []byte("\r"), []byte(""), -1)
}
// FindAvailablePort returns an available and valid TCP port.
func FindAvailablePort() (*net.TCPAddr, error) {
l, err := net.Listen("tcp", ":0")