jerrysu / gulp-rsync

Gulp plugin for deploying files via rsync
119 stars 51 forks source link

Doesn't work on windows error code 1 #30

Open c-hris opened 8 years ago

c-hris commented 8 years ago

My configuration file is: var gulp = require('gulp'); rsync = require('gulp-rsync'); gulp.task('rsync', function() { return gulp.src('_site/**') .pipe(rsync({ root: '_site', hostname: 'ftp.domain.com', username: 'user@domain.com', destination: 'public_html', incremental: true, recursive: true, compress: true, times: true, progress: true, exclude: [] })); });

And this is when I run the task: [21:51:54] Starting 'rsync'... [21:51:57] gulp-rsync: Starting rsync to user@web.com@ftp.web.com:/pub lic_html... [21:51:57] gulp-rsync: 'rsync' is not recognized as an internal or external comm [21:51:57] gulp-rsync: [21:51:57] gulp-rsync: perable program or batch file. [21:51:57] 'rsync' errored after 2.99 s [21:51:57] Error in plugin 'gulp-rsync' Message: Error: rsync exited with code 1 at ChildProcess.<anonymous> (c:\Users\chris\desktop\fido\node_modules\gu lp-rsync\rsync.js:110:17) at emitTwo (events.js:87:13) at ChildProcess.emit (events.js:172:7) at maybeClose (internal/child_process.js:818:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) [21:51:57] gulp-rsync: Completed rsync.

c-hris commented 8 years ago

Any suggestions?

dkesberg commented 8 years ago

Do you have rsync installed? It is not a native windows command.

You can use Cygwin to get unix commands for windows. Dont forget to update your PATH.