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

feat: use simpler env vars for win32 #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CanadaHonk
Copy link

@CanadaHonk CanadaHonk commented Nov 22, 2023

Just use environment variables PROCESSOR_ARCHITEW6432/PROCESSOR_ARCHITECTURE on win32 instead of checking paths. Closes #26.

Bonus when running as x86: probably much faster and works with no IO access. Also ~10% smaller filesize.

@XhmikosR
Copy link

Agreed, this is a lot simpler and probably faster. @feross do you see something wrong with this approach?

@CanadaHonk
Copy link
Author

Fixed formatting to be like the rest of the repo.

@CanadaHonk
Copy link
Author

Updated to return 'arm64' on such systems now too.

Just use environment variables `PROCESSOR_ARCHITEW6432`/`PROCESSOR_ARCHITECTURE` on win32 instead of checking paths. Closes feross#26.
@CanadaHonk
Copy link
Author

Removed now unused imports in index.js.

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.

Just use env variables PROCESSOR_ARCHITEW6432/PROCESSOR_ARCHITECTURE on win32
2 participants