jerrysu / gulp-rsync

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

Error: Source contains paths outside of root #38

Open COLABORATI opened 8 years ago

COLABORATI commented 8 years ago

I would like to copy a ../path/outside of the current directory with the gulpfile.js to a host. It is really ok in this case to have the directory above the current one. I get this error: Error: Source contains paths outside of root

Other npm modules like 'del' offer a force: true option for this use case.

Oh, btw when I use ../path/outside as src, what is ok in rsync, the source path is reduced to . in the resulting rsync command, like this: rsync -anRvz --progress --delete . host:/target/directory so I used the path module to resolve the path gulp.src(path.resolve(dist))

lostandfownd commented 8 years ago

Have the same issue here , please help

skukx commented 8 years ago

Same issue, would loved to be able todo this

skukx commented 8 years ago

To resolve issue use rsync options like:

gulp.src('../path/outside/**')
  .pipe(rsync({
    root: '../path/outside',
    destination: '/target/directory'
  }));

See https://www.npmjs.com/package/gulp-rsync#root