Skip to content

Request to change line so that the resulting path of the global root of npm can contain literal parenthesis when spawing a child process. #324

@ddc-aaroncope

Description

@ddc-aaroncope

https://github.com/mateodelnorte/meta/blob/1b727d56b7f09d3f27788ac02346f184622d36de/lib/findPlugins.js#L42C51-L42C51

When a local path is something like this on Windows, and the result of npm root -g in the line referenced above:

It should result as:
C:\Users\myusername(myorg)\AppData\Roaming\npm\node_modules

instead, it current trims off anything at the position of the opening parenthesis, and the path resolves as this:

C:\Users\myusername

As such, when running any meta git command, the result is the error: "C:\Users\myusername" is not recognized as an internal or external command, operable program or batch file.

It seems that meta doesn't handle user paths with parenthesis in them. Could the code be altered to be tolerant of that situation please? I don't want to be overly prescriptive with a specific solution, but here is a similar issue raised in a different git repo that presents some options for handling problematic characters: nodejs/node#38490

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions