From f6e9c20396a9e9b4c2ad6bdb13cc822f7ef714c6 Mon Sep 17 00:00:00 2001 From: liufumingren Date: Sat, 25 Jul 2026 02:09:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20runSsh=20=E6=81=A2=E5=A4=8D=E4=B8=BA?= =?UTF-8?q?=E4=B8=8E=E5=8F=82=E8=80=83=E9=A1=B9=E7=9B=AE=E4=B8=80=E8=87=B4?= =?UTF-8?q?=E7=9A=84=20bash=20-lc=20=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/deploy-lib.cjs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/script/deploy-lib.cjs b/script/deploy-lib.cjs index c95c474..a0ddbef 100644 --- a/script/deploy-lib.cjs +++ b/script/deploy-lib.cjs @@ -220,12 +220,10 @@ function buildSshBaseArgs(config) { } function runSsh(config, remoteScript, options = {}) { - // Base64 编码脚本传给远端 bash,避免 shell 嵌套引用和输出信号问题 - const encoded = Buffer.from(remoteScript, 'utf8').toString('base64'); const args = [ ...buildSshBaseArgs(config), `${config.username}@${config.host}`, - `echo ${quoteForBash(encoded)} | base64 -d | bash`, + `bash -lc ${quoteForBash(remoteScript)}`, ]; return runCommand('ssh', args, {