Gulp - How to change a destination folders permissions? -
i'm copying file , creating new destination folder file.
return gulp.src('path/to/file/file.jpg') .pipe( gulp.dest('path/to/destination');
the problem folder created has wrong permissions. i've looked on , can't seem find information on how change destination folder's permissions gulp. i've looked gulp-chmod, far can change permissions of file.jpg within new folder.
gulp.src('path/to/file/file.jpg') .pipe(chmod(0o777, true)) .pipe( gulp.dest('path/to/destination/'));
you might try adding "mode" option gulp.dest since state creating new folder. see
options.mode
type: string default: 0777 octal permission string specifying mode folders need created output folder.
so,
.pipe( gulp.dest('path/to/destination', {mode: 0777});
although default think shouldn't need it. try using 0777 instead of 0o777 in chmod call easy try.
Comments
Post a Comment