Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment to block graceful-fs #187

Open
coreyfarrell opened this issue May 7, 2020 · 2 comments
Open

Environment to block graceful-fs #187

coreyfarrell opened this issue May 7, 2020 · 2 comments

Comments

@coreyfarrell
Copy link
Collaborator

For troubleshooting purposes we should support an environment to block initialization of graceful-fs. So if the environment were set we would simply export a clone of fs with a gracefulify stub added. This way people can easily determine if a bug is caused by graceful-fs or the code running it.

@ChALkeR
Copy link
Contributor

ChALkeR commented Feb 9, 2021

This is not specific to graceful-fs imo, and could be done via yarn resolutions, for example.

@jpolvora
Copy link

var realFs = require('fs')
var gracefulFs = require('graceful-fs')

// determineIfNativeFsModuleWillBePatched

if (process.env.ENABLE_GRACEFUL_FS === '1') {
  gracefulFs.gracefulify(realFs)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants