From ab6a1309508564a0a0b718bd09b434185ff10ea0 Mon Sep 17 00:00:00 2001 From: zeaslity Date: Wed, 12 Mar 2025 14:27:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96Zsh=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E6=89=A7=E8=A1=8C=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除oh-my-zsh插件列表文件的清理步骤 - 将Zsh安装命令从"/bin/bash"改为"sh -c" - 针对国内网络环境,使用SingleLineCommandExecutor设置远程仓库地址 - 简化Zsh插件安装命令的执行方式 --- agent-wdd/cmd/Zsh.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 安装命令