Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Source contains paths outside of root #38

Open
COLABORATI opened this issue Jun 15, 2016 · 3 comments
Open

Error: Source contains paths outside of root #38

COLABORATI opened this issue Jun 15, 2016 · 3 comments

Comments

@COLABORATI
Copy link

COLABORATI commented Jun 15, 2016

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
Copy link

Have the same issue here , please help

@skukx
Copy link

skukx commented Jul 6, 2016

Same issue, would loved to be able todo this

@skukx
Copy link

skukx commented Jul 6, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants