From f09a8d0277b9c38a2eaed08f87c80a9afe4205b8 Mon Sep 17 00:00:00 2001 From: GarryOne Date: Wed, 25 Mar 2020 05:28:27 +0200 Subject: [PATCH] Removed console.log() --- dist/index.js | 19 +++++++++---------- src/index.js | 19 +++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/dist/index.js b/dist/index.js index 79a6875..cfb540f 100755 --- a/dist/index.js +++ b/dist/index.js @@ -481,7 +481,6 @@ const nodeCmd = __webpack_require__(428); const nodeRsync = __webpack_require__(250); const { REMOTE_HOST, REMOTE_USER, REMOTE_PORT, SSH_PRIVATE_KEY, DEPLOY_KEY_NAME, SOURCE, TARGET, ARGS, GITHUB_WORKSPACE, HOME } = process.env; -console.log('GITHUB_WORKSPACE', GITHUB_WORKSPACE); const sshDeploy = (() => { const rsync = ({ privateKey, port, src, dest, args }) => { @@ -504,14 +503,14 @@ const sshDeploy = (() => { }; const init = ({ - src, - dest, - args, - host = 'localhost', - username, - privateKeyContent, - port - }) => { + src, + dest, + args, + host = 'localhost', + username, + privateKeyContent, + port + }) => { validateRsync(() => { const privateKey = addSshKey(privateKeyContent, DEPLOY_KEY_NAME ||'deploy_key'); @@ -605,7 +604,7 @@ const validateInputs = (inputs) => { return input; }); - if (validInputs.length !== inputs.length) { + if (validInputs.length !== Object.keys(inputs).length) { process.abort(); } }; diff --git a/src/index.js b/src/index.js index 3ad396b..8916c2b 100644 --- a/src/index.js +++ b/src/index.js @@ -6,7 +6,6 @@ const nodeCmd = require('node-cmd'); const nodeRsync = require('rsyncwrapper'); const { REMOTE_HOST, REMOTE_USER, REMOTE_PORT, SSH_PRIVATE_KEY, DEPLOY_KEY_NAME, SOURCE, TARGET, ARGS, GITHUB_WORKSPACE, HOME } = process.env; -console.log('GITHUB_WORKSPACE', GITHUB_WORKSPACE); const sshDeploy = (() => { const rsync = ({ privateKey, port, src, dest, args }) => { @@ -29,14 +28,14 @@ const sshDeploy = (() => { }; const init = ({ - src, - dest, - args, - host = 'localhost', - username, - privateKeyContent, - port - }) => { + src, + dest, + args, + host = 'localhost', + username, + privateKeyContent, + port + }) => { validateRsync(() => { const privateKey = addSshKey(privateKeyContent, DEPLOY_KEY_NAME ||'deploy_key'); @@ -130,7 +129,7 @@ const validateInputs = (inputs) => { return input; }); - if (validInputs.length !== inputs.length) { + if (validInputs.length !== Object.keys(inputs).length) { process.abort(); } };