Skip to content

Commit

Permalink
fix: invalid filepath in the setup cmd on windows
Browse files Browse the repository at this point in the history
Signed-off-by: rick <LinuxSuRen@users.noreply.github.com>
  • Loading branch information
LinuxSuRen committed Mar 29, 2024
1 parent 5178993 commit 8363721
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/installer/check.go
Expand Up @@ -568,7 +568,8 @@ type proxyServer struct {

// GetProxyServers returns the proxy servers
func GetProxyServers() []string {
configFile := sysos.ExpandEnv("$HOME/.config/hd-home/proxy.yaml")
home, _ := homedir.Dir()
configFile := filepath.Join(home, ".config/hd-home/proxy.yaml")

Check warning on line 572 in pkg/installer/check.go

View check run for this annotation

Codecov / codecov/patch

pkg/installer/check.go#L571-L572

Added lines #L571 - L572 were not covered by tests
data, err := sysos.ReadFile(configFile)
if err == nil {
proxyServer := &proxyServer{}
Expand Down

0 comments on commit 8363721

Please sign in to comment.