From caaa95b6516fd68c747b4defe1ebe215cf2e04eb Mon Sep 17 00:00:00 2001 From: Leung-JZ <375082677@qq.com> Date: Thu, 12 Mar 2020 09:16:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20ARGS=20=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E6=97=B6=E5=AF=BC=E8=87=B4=20rsync=20=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 由于 ARGS 非必填,当其为空时,报错: ⚠️ An error happened:(. Cannot read property 'match' of undefined TypeError: Cannot read property 'match' of undefined --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index cd88f92..5a5ed28 100644 --- a/src/index.js +++ b/src/index.js @@ -140,7 +140,7 @@ const run = () => { sshDeploy.init({ src: GITHUB_WORKSPACE + '/' + SOURCE || '', dest: TARGET || '/home/' + REMOTE_USER + '/', - args: [ARGS] || ['-rltgoDzvO'], + args: ARGS ? [ARGS] : ['-rltgoDzvO'], host: REMOTE_HOST, port: REMOTE_PORT || '22', username: REMOTE_USER,