修改代码注释为中文
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user