diff --git a/agent-wdd/cmd/Zsh.go b/agent-wdd/cmd/Zsh.go index 98d37c6..8a49c23 100644 --- a/agent-wdd/cmd/Zsh.go +++ b/agent-wdd/cmd/Zsh.go @@ -38,7 +38,6 @@ func addZshSubcommands(cmd *cobra.Command) { // 清理残留 utils.RemoveFolderComplete("/root/.oh-my-zsh") utils.RemoveFolderComplete("/root/wdd/zsh-install.sh") - utils.RemoveFolderComplete("/root/wdd/oh-my-zsh-plugins-list.txt") ohMyZshInstallUrl := "" @@ -61,14 +60,16 @@ func addZshSubcommands(cmd *cobra.Command) { }) installZshCommand := []string{ - "/bin/bash", + "sh", + "-c", "/root/wdd/zsh-install.sh", } if config.ConfigCache.Agent.Network.Internet == 7 { - installZshCommand = append(installZshCommand, + op.SingleLineCommandExecutor([]string{ + "export", "REMOTE=https://gitea.107421.xyz/zeaslity/ohmyzsh.git", - ) + }) } // 执行 oh-my-zsh 安装命令