Skip to content

Commit

Permalink
fix: invalid filepath in the setup cmd on windows (#468)
Browse files Browse the repository at this point in the history
Signed-off-by: rick <LinuxSuRen@users.noreply.github.com>
Co-authored-by: rick <LinuxSuRen@users.noreply.github.com>
  • Loading branch information
LinuxSuRen and LinuxSuRen committed Mar 29, 2024
1 parent 5178993 commit 016a1cb
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")
data, err := sysos.ReadFile(configFile)
if err == nil {
proxyServer := &proxyServer{}
Expand Down

0 comments on commit 016a1cb

Please sign in to comment.