mirror of
https://github.com/easingthemes/ssh-deploy.git
synced 2025-06-22 12:32:09 +10:00
better reject message
This commit is contained in:
parent
9d9498978c
commit
bc37bf088b
3 changed files with 15 additions and 11 deletions
|
@ -5,10 +5,14 @@ const nodeRsyncPromise = async (config) => new Promise((resolve, reject) => {
|
|||
try {
|
||||
nodeRsync(config, (error, stdout, stderr, cmd) => {
|
||||
if (error) {
|
||||
console.log('⚠️ [Rsync] stderr: ', stderr);
|
||||
console.log('⚠️ [Rsync] stdout: ', stdout);
|
||||
console.log('⚠️ [Rsync] cmd: ', cmd);
|
||||
reject(error);
|
||||
console.error('⚠️ [Rsync] error: ');
|
||||
console.error(error);
|
||||
console.error('⚠️ [Rsync] stderr: ');
|
||||
console.error(stderr);
|
||||
console.error('⚠️ [Rsync] stdout: ');
|
||||
console.error(stdout);
|
||||
console.error('⚠️ [Rsync] cmd: ', cmd);
|
||||
reject(new Error(`${error.message}\n\n${stderr}`));
|
||||
} else {
|
||||
resolve(stdout);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue