Skip to content

Double slashes in Windows "c:\Program Files\nodejs\\*" process strings  #39010

@terryschwarz

Description

@terryschwarz
  • Version: v14.17.0
  • Platform: Microsoft Windows [Version 10.0.19042.1052]
  • Subsystem:

Any use of npm.cmd or npx.cmd command causes strings with "c:\Program Files\nodejs" to show up as
"c:\Program Files\nodejs\\..." in the Windows task manager information.

for example:
image

I don't believe this actually causes errors, but it leaves a bad impression when someone notices it and at some point might be even questioned as the source of some issue.

I actually tracked this down to use of ...

SET "NODE_EXE=%~dp0\node.exe"

in the script when they should have done something like ...

SET "SCRIPTPATH=%~dp0"
SET "NODE_EXE=%SCRIPTPATH%node.exe"

to avoid the double slash

Metadata

Metadata

Assignees

No one assigned

    Labels

    npmIssues and PRs related to the npm client dependency or the npm registry.wrong repoIssues that should be opened in another repository.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions