Skip to content

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

Closed
@swrdfish

Description

@swrdfish

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions