mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-12 20:13:59 +02:00
Fix Appveyor Windows build and GitInfo path issue on Windows
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
6e0f326b9d
commit
09a0af94f5
@@ -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")
|
||||
|
Reference in New Issue
Block a user