mirror of
https://github.com/easingthemes/ssh-deploy.git
synced 2025-04-30 11:40:44 -04:00
add onStderr and onStdout
This commit is contained in:
parent
1eac106a16
commit
2b4b55bbb6
2 changed files with 4 additions and 4 deletions
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,5 @@
|
||||||
const { execSync } = require('child_process');
|
const { execSync } = require('child_process');
|
||||||
const nodeRsync = require('rsyncwrapper');
|
const nodeRsync = require('rsyncwrapper');
|
||||||
const { writeToFile } = require('./helpers');
|
|
||||||
|
|
||||||
const nodeRsyncPromise = async (config) => new Promise((resolve, reject) => {
|
const nodeRsyncPromise = async (config) => new Promise((resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
|
@ -26,7 +25,7 @@ const validateRsync = async () => {
|
||||||
console.log('⚠️ [CLI] Rsync exists');
|
console.log('⚠️ [CLI] Rsync exists');
|
||||||
return;
|
return;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('⚠️ [CLI] Rsync doesn\'t exists', error);
|
console.log('⚠️ [CLI] Rsync doesn\'t exists', error.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('⚠️ [CLI] Start rsync installation with "apt-get" \n');
|
console.log('⚠️ [CLI] Start rsync installation with "apt-get" \n');
|
||||||
|
@ -55,7 +54,8 @@ const rsyncCli = async ({
|
||||||
return nodeRsyncPromise({
|
return nodeRsyncPromise({
|
||||||
...defaultOptions,
|
...defaultOptions,
|
||||||
src: source, dest: rsyncServer, excludeFirst: exclude, port: remotePort,
|
src: source, dest: rsyncServer, excludeFirst: exclude, port: remotePort,
|
||||||
privateKey: privateKeyPath, args, sshCmdArgs
|
privateKey: privateKeyPath, args, sshCmdArgs,
|
||||||
|
onStdout: (data) => console.log(data), onStderr: (data) => console.error(data)
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue