Remove windows file readonly attribute in gulp file

蓝咒 提交于 2019-12-06 02:28:41

I figured out the answer:

To remove readonly attribute of all files under a directory recursively, we run the following command in windows Command line

attrib -r <dir-name>\*.* /s

Following gulp task removes readonly attribute of all files under

gulp.task('remove-readonly-attributes', function() {
    require("child_process").exec("attrib -r <dir-name>\*.* /s");
});

I ended up solving this problem with gulp-chmod.

https://www.npmjs.com/package/gulp-chmod

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!