fix: download bug

This commit is contained in:
fengcaiwen
2023-12-16 23:21:55 +08:00
parent c0da61cd4b
commit 7c53cbc79b
3 changed files with 9 additions and 3 deletions

View File

@@ -246,7 +246,7 @@ func (w *wsHandler) remoteInstallKubevpnIfCommandNotFound(ctx context.Context, s
w.Log("Get latest kubevpn version failed: %v", err)
return err
}
fmt.Printf("The latest version is: %s, commit: %s\n", latestVersion, latestCommit)
w.Log("The latest version is: %s, commit: %s", latestVersion, latestCommit)
var temp *os.File
temp, err = os.CreateTemp("", "")
if err != nil {
@@ -304,6 +304,7 @@ func (w *wsHandler) Log(format string, a ...any) {
str = fmt.Sprintf(format, a...)
}
w.conn.Write([]byte(str + "\r\n"))
log.Infof(format, a...)
}
func (w *wsHandler) PrintLine(msg string) {