Skip to content

Commit b2e9d7a

Browse files
committed
Fix Windows path separator in doctor config file output
Use filepath.ToSlash so the config file path always uses forward slashes, making acceptance test output stable across OSes. Co-authored-by: Isaac
1 parent 113fce1 commit b2e9d7a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/doctor/checks.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"fmt"
88
"io"
99
"net/http"
10+
"path/filepath"
1011
"time"
1112

1213
"github.com/databricks/cli/internal/build"
@@ -92,15 +93,15 @@ func checkConfigFile(cmd *cobra.Command) CheckResult {
9293
return CheckResult{
9394
Name: "Config File",
9495
Status: statusFail,
95-
Message: "Cannot read " + path,
96+
Message: "Cannot read " + filepath.ToSlash(path),
9697
Detail: err.Error(),
9798
}
9899
}
99100

100101
return CheckResult{
101102
Name: "Config File",
102103
Status: statusPass,
103-
Message: fmt.Sprintf("%s (%d profiles)", path, len(profiles)),
104+
Message: fmt.Sprintf("%s (%d profiles)", filepath.ToSlash(path), len(profiles)),
104105
}
105106
}
106107

0 commit comments

Comments
 (0)