修改代码注释为中文

This commit is contained in:
zyj
2026-03-04 14:10:30 +08:00
parent 89d64cb117
commit 2cb4e1a87b
16 changed files with 1031 additions and 69 deletions

View File

@@ -55,7 +55,7 @@ func (p *WindowsPlatform) AddToPath(ctx context.Context, dir string) error {
}
func (p *WindowsPlatform) IsAdmin() bool {
// Check if running as administrator on Windows
// 检查 Windows 上是否以管理员身份运行
cmd := exec.Command("net", "session")
err := cmd.Run()
return err == nil
@@ -77,7 +77,7 @@ func (p *WindowsPlatform) PackageManagers() []string {
func (p *WindowsPlatform) DefaultShell() string {
if _, err := exec.LookPath("pwsh"); err == nil {
return "pwsh" // PowerShell 7+
return "pwsh" // PowerShell 7+ 版本
}
return "powershell" // Windows PowerShell 5.1
}