Skip to content

Commit

Permalink
fix: 修复 ARGS 为空时导致 rsync 执行错误问题。
Browse files Browse the repository at this point in the history
由于 ARGS 非必填,当其为空时,报错:

⚠️ An error happened:(. Cannot read property 'match' of undefined TypeError: Cannot read property 'match' of undefined
  • Loading branch information
JZLeung committed Mar 12, 2020
1 parent d86da2b commit caaa95b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit caaa95b

Please sign in to comment.