simple command exists fix

This commit is contained in:
Dragan Filipovic 2023-01-02 02:16:05 +01:00
parent 0172041408
commit 1b6513031e
2 changed files with 3 additions and 3 deletions

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@ const nodeRsync = require('rsyncwrapper');
// eslint-disable-next-line no-async-promise-executor
const validateRsync = new Promise(async (resolve, reject) => {
let rsyncCli = false;
let rsyncCli;
try {
execSync('rsync --version', { stdio: 'inherit' });
rsyncCli = true;
@ -14,8 +14,8 @@ const validateRsync = new Promise(async (resolve, reject) => {
if (rsyncCli) {
console.log('⚠️ [CLI] Rsync exists');
execSync('rsync --version', { stdio: 'inherit' });
resolve();
return;
}
console.log('⚠️ [CLI] Rsync doesn\'t exists. Start installation with "apt-get" \n');