Skip to content

Commit

Permalink
alway create a new mem-fs-editor instance instead of using shared.
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Feb 14, 2023
1 parent 0346ca7 commit 7bec553
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 167 deletions.
3 changes: 2 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const chalk = require('chalk');
const minimist = require('minimist');
const runAsync = require('run-async');
const createDebug = require('debug');
const memFsEditor = require('mem-fs-editor');

const packageJson = require('../package.json');
const Storage = require('./util/storage');
Expand Down Expand Up @@ -204,7 +205,7 @@ class Generator extends Base {
// Ensure source/destination path, can be configured from subclasses
this.sourceRoot(path.join(path.dirname(this.resolved), 'templates'));

this.fs = this.env.fs;
this.fs = memFsEditor.create(this.env.sharedFs);
}

// Add convenience debug object
Expand Down
Loading

0 comments on commit 7bec553

Please sign in to comment.