-1

I have

D1
  SD1
  SD2
  SD3
  dist

I want to copy all directories under D1 (except dist) to dist. Obviously I can't copy dist to dist otherwise it will be recursive indefinitely.

This is my code

gulp.task('extras', () => {
  return gulp.src([
    '**/*',
    '!dist/**'], {
    dot: true
  }).pipe(gulp.dest('dist'));
});

and it says

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: EISDIR: illegal operation on a directory, read
    at Error (native)
IsmailS
  • 10,797
  • 21
  • 82
  • 134

1 Answers1

-1

There was a directory symlink which was creating problem. It worked upon excluding.

IsmailS
  • 10,797
  • 21
  • 82
  • 134