Skip to content

Node.js returns platform as darwin when running on windows #572

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

Closed
2 of 5 tasks
swrdfish opened this issue Sep 6, 2022 · 0 comments
Closed
2 of 5 tasks

Node.js returns platform as darwin when running on windows #572

swrdfish opened this issue Sep 6, 2022 · 0 comments
Labels
bug Something isn't working needs triage

Comments

@swrdfish
Copy link

swrdfish commented Sep 6, 2022

Description:
While running a node.js application on windows machine, process.platform returns darwin
The same behaviour is noticed when using os.platform()

Action version:
Using `actions/setup-node@v2

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

node-version: 16.17.0

Repro steps:
Run any node script and console log process.platform

console.log(process.platform) // returns 'darwin'

Expected behavior:
Should return 'win32'

Actual behavior:
Returns 'darwin'

@swrdfish swrdfish added bug Something isn't working needs triage labels Sep 6, 2022
@swrdfish swrdfish closed this as completed Sep 6, 2022
deining pushed a commit to deining/setup-node that referenced this issue Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

1 participant