-
-
Notifications
You must be signed in to change notification settings - Fork 144
Closed
Labels
Description
Recently I have found that when I imported memfs/lib/process.js and used gulp to copy a directory with a subdirectory, I got an error Error: EPERM: operation not permitted, futime.
dest
test
│ index.js
└───sub
│ index.js
Here is the snippet to show how to reproduce the problem:
// test/index.js
const path = require('path');
const gulp = require('gulp');
// require('memfs/lib/process.js');
process.getuid = process.getuid || (() => 0);
gulp.src(['**/*']).pipe(gulp.dest(path.resolve(__dirname, '../dest')))It seems that it is a mocked uid resulting in side effects when trying to futime.
The temporary workaround is to revert it within the current process:
require('memfs');
process.platform === 'win32' && delete process.getuid;Reactions are currently unavailable