mirror of
https://github.com/easingthemes/ssh-deploy.git
synced 2025-04-28 19:00:44 -04:00
better reject message
This commit is contained in:
parent
9d9498978c
commit
bc37bf088b
3 changed files with 15 additions and 11 deletions
12
.github/workflows/e2e.yml
vendored
12
.github/workflows/e2e.yml
vendored
|
@ -64,9 +64,9 @@ jobs:
|
|||
SOURCE: "test_project/"
|
||||
TARGET: "/var/www/html/"
|
||||
EXCLUDE: "/dist/, /node_modules/"
|
||||
SCRIPT_BEFORE: |
|
||||
whoami
|
||||
ls -al
|
||||
SCRIPT_AFTER: |
|
||||
whoami
|
||||
ls -al
|
||||
# SCRIPT_BEFORE: |
|
||||
# whoami
|
||||
# ls -al
|
||||
# SCRIPT_AFTER: |
|
||||
# whoami
|
||||
# ls -al
|
||||
|
|
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
|
@ -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
Reference in a new issue