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

Work around os.cpus() returning an empty array on unsupported platforms #3095

Merged
merged 5 commits into from
Aug 27, 2022

Conversation

catink123
Copy link
Contributor

There is a bug in Node's built-in os module, where, in some cases, getting the os.cpus() value will return an empty Array. As a result, the testing process won't even start. To accommodate for this issue, I suggest adding a check for os.cpus() value.

lib/api.js Outdated Show resolved Hide resolved
@catink123
Copy link
Contributor Author

Here's the Node.js issue describing the os.cpus() bug: nodejs/node#38190

@novemberborn
Copy link
Member

On what platform are you running into this, and with which version of Node.js?

@catink123
Copy link
Contributor Author

I'm using Node.js 18.7.0 and running it on Android

@novemberborn
Copy link
Member

Okay now I am curious, why run AVA on Android?

@catink123
Copy link
Contributor Author

Well, as I wanted to try web development on the go and I don't have a laptop, I decided to do it on my Android tablet, using Termux and Neovim. Most utilities just work and only some refuse to work because of bugs and poor (if any) support for Android.

@novemberborn
Copy link
Member

Fair enough!

@catink123
Copy link
Contributor Author

Thanks!

@catink123 catink123 closed this Aug 26, 2022
@novemberborn novemberborn reopened this Aug 27, 2022
@novemberborn novemberborn changed the title Accommodate for os.cpus() bug Work around os.cpus() returning an empty array on unsupported platforms Aug 27, 2022
@novemberborn novemberborn merged commit 4b03662 into avajs:main Aug 27, 2022
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

Successfully merging this pull request may close these issues.

3 participants