mateodelnorte / meta

tool for turning many repos into a meta repo. why choose many repos or a monolithic repo, when you can have both with a meta repo?
MIT License
2.06k stars 100 forks source link

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

Open ddc-aaroncope opened 1 year ago

ddc-aaroncope commented 1 year ago

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: https://github.com/nodejs/node/issues/38490