提交 2f9bead8 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

Merge remote-tracking branch 'origin/master'

......@@ -23,7 +23,7 @@
},
{
"id": "add_to_path_tips_win",
"translation": "您可运行%s将zd.exe加入$PATH环境变量,以方便在任何目录中执行。"
"translation": "您可运行 %s 将zd.exe加入$PATH环境变量,以方便在任何目录中执行。"
},
{
"id": "add_to_path_win",
......
......@@ -146,7 +146,8 @@ func InputForSet() {
// set PATH environment vari
var addToPath bool
if commonUtils.IsWin() {
stdinUtils.InputForBool(&addToPath, true, "add_to_path_win")
addToPath = true
// stdinUtils.InputForBool(&addToPath, true, "add_to_path_win")
} else {
stdinUtils.InputForBool(&addToPath, true, "add_to_path_linux")
}
......@@ -174,8 +175,8 @@ func addZdToPathWin(home string) {
pathVar := os.Getenv("PATH")
if strings.Contains(pathVar, vari.ExeDir) { return }
cmd := fmt.Sprintf(`setx Path "%%Path%%;%s"`, vari.ExeDir)
logUtils.PrintToWithColor(i118Utils.I118Prt.Sprintf("add_to_path_tips_win", cmd), color.FgRed)
cmd := `setx Path "%%Path%%;` + vari.ExeDir + `"`
logUtils.PrintToWithColor("\n" + i118Utils.I118Prt.Sprintf("add_to_path_tips_win", cmd), color.FgRed)
// TODO: fix the space issue
//out, err := shellUtils.ExeShell(cmd)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册