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, {