Addressed review comments made by @ttaylorr
This commit is contained in:
parent
6c94225ea3
commit
417b4338f4
@ -576,12 +576,10 @@ func GetCommitSummary(commit string) (*CommitSummary, error) {
|
||||
func isCygwin() bool {
|
||||
cmd := subprocess.ExecCommand("uname")
|
||||
out, err := cmd.Output()
|
||||
output := string(out)
|
||||
if (err == nil) && (strings.Contains(output, "CYGWIN")) {
|
||||
return true
|
||||
} else {
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
return bytes.Contains(out, []byte("CYGWIN"))
|
||||
}
|
||||
|
||||
func translateCygwinPath(path string) (string, error) {
|
||||
@ -589,8 +587,7 @@ func translateCygwinPath(path string) (string, error) {
|
||||
buf := &bytes.Buffer{}
|
||||
cmd.Stderr = buf
|
||||
out, err := cmd.Output()
|
||||
output := string(out)
|
||||
output = strings.TrimSpace(output)
|
||||
output := strings.TrimSpace(string(out))
|
||||
if err != nil {
|
||||
return path, fmt.Errorf("Failed to translate path from cygwin to windows: %s", buf.String())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user