G
G
Geez362018-04-25 12:50:43
SSH
Geez36, 2018-04-25 12:50:43

What does "exited with code 1" mean when running rsync via gulp?

There is a task for gallp:

gulp.task('rsync', function() {
return gulp.src('app/**')
.pipe(rsync({
root: 'app/',
hostname: '***@*****' ,
destination: '*****/public_html/',
// include: ['*.htaccess'], // Includes files to deploy
exclude: ['**/Thumbs.db', '**/*. DS_Store'], // Excludes files from deploy
recursive: true,
archive: true,
silent: false,
compress: true
}))
})

Configured SSH connection everything works with a bang.
When executing, the task gets out

Error: rsync exited with code 1
Error in plugin 'gulp-rsync'
Message:
Error: rsync exited with code 1
at ChildProcess. (C:\***\node_modules\gulp-rsync\rsync.js:110:17)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal /child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211: 7)
at Pipe._handle.close [as _onclose] (net.js:554:12)

How can this be fixed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Arkhipov, 2018-04-25
@arvitaly

Obviously, the plugin is causing an error, to catch it you need to subscribe to the event

const rsyncStream = rsync({...});
rsyncStream.on('error', function(error) {
      // we have an error
console.log(error); 
    })

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question