Skip to content
New issue

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

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

Already on GitHub? # to your account

tape stops logging when using mock-fs #201

Closed
nemoxps opened this issue Mar 20, 2017 · 8 comments
Closed

tape stops logging when using mock-fs #201

nemoxps opened this issue Mar 20, 2017 · 8 comments
Labels

Comments

@nemoxps
Copy link

nemoxps commented Mar 20, 2017

I'm not sure what's going on, but if mock-fs can't handle fs.writeSync(1, content), then it might be a bug in that library.

Take a look at tape-testing/tape#354.

@tschaub tschaub added the bug label Apr 27, 2017
@tschaub
Copy link
Owner

tschaub commented Apr 27, 2017

Thanks for the report @nemoxps.

xz64 added a commit to xz64/license-webpack-plugin that referenced this issue Aug 12, 2017
There is a bug using mock-fs + tape together on Windows:
tschaub/mock-fs#201

So Windows tests cannot work for now.
@ryanblock
Copy link

This bit me today (in Windows, not on Mac or *nix), any thoughts on how we might approach a fix?

@tschaub
Copy link
Owner

tschaub commented Sep 2, 2020

Here is one approach: 80d318f. This only works for stdin/out/err streams connected to a text terminal. For non-TTY environments, the process never exits – I didn't spend enough time to figure it out, but maybe someone else can. There are likely other ways to bypass the mock filesystem for the special 0, 1, and 2 file descriptors.

@ryanblock
Copy link

I'm back because I was once again bitten by this bug! (lol)

No opinion on that specific fix but in theory I'm happy to help write some tests around this.

@filmaj
Copy link

filmaj commented Mar 3, 2021

I have also been bit by this bug 🙈

Same here, I am not familiar enough with mock-fs internals to say which approach should be taken, but for what it is worth, the std branch of mock-fs fixes the issue! (I tried it out on a PR in our project: architect/logs#311)

filmaj added a commit to architect/logs that referenced this issue Mar 3, 2021
@filmaj
Copy link

filmaj commented Apr 21, 2021

Friendly bump 😄
I hit this bug again today haha. I always forget about this, and then remember, and end up back here.
What are the chances of getting the std branch that is pushed up to the origin of this repo merged into mainline?

@tschaub
Copy link
Owner

tschaub commented Apr 22, 2021

See how things go with mock-fs@4.14.

@tschaub tschaub closed this as completed Apr 22, 2021
@filmaj
Copy link

filmaj commented Apr 23, 2021

Awesome, thanks so much @tschaub ! Works great for us over in the @architect project!

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

No branches or pull requests

4 participants