From 016a1cb777ab76b7462838f577b5ca0ed329e922 Mon Sep 17 00:00:00 2001 From: Rick <1450685+LinuxSuRen@users.noreply.github.com> Date: Fri, 29 Mar 2024 14:39:41 +0800 Subject: [PATCH] fix: invalid filepath in the setup cmd on windows (#468) Signed-off-by: rick Co-authored-by: rick --- pkg/installer/check.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/installer/check.go b/pkg/installer/check.go index 34cdff6..a8f0bf8 100644 --- a/pkg/installer/check.go +++ b/pkg/installer/check.go @@ -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{}