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

os.arch() and os.platform() are not correct #173

Closed
kriszyp opened this issue May 17, 2022 · 2 comments · Fixed by #1115
Closed

os.arch() and os.platform() are not correct #173

kriszyp opened this issue May 17, 2022 · 2 comments · Fixed by #1115
Labels
node.js Compatibility with Node.js APIs

Comments

@kriszyp
Copy link

kriszyp commented May 17, 2022

Currently os.platform() reports "browser", and os.arch() reports "javascript". These functions are used for determining the appropriate binary build to load, but these values don't actually represent the real os/arch. os.platform() should report "linux" (or "darwin" or hopefully someday "win32"), and os.arch() should report "x64" or "arm64" (or anything else you support).

@Jarred-Sumner
Copy link
Collaborator

(said this over DM but repeating for other readers)

The issue is bun doesn't implement the "os" module right now – it's using a browserify polyfill. Will fix this at least partially in teh next release, though will probably not implement all of "os" next release. Just enough to make it work a little better

@xhyrom
Copy link
Collaborator

xhyrom commented Aug 11, 2022

I'll try to implement it after vacation 👍

@xhyrom xhyrom linked a pull request Aug 20, 2022 that will close this issue
60 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
node.js Compatibility with Node.js APIs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants