Support -local for npm

[Gitee link #I9V5I0]
This commit is contained in:
Aoran Zeng 2024-06-11 22:05:12 +08:00
parent 076b4e77f3
commit 7d72955c56

View File

@ -252,9 +252,15 @@ pl_nodejs_setsrc (char *option)
char *cmd = NULL;
char *where = "";
if (Cli_Option_Locally==true)
{
where = "--location project ";
}
if (npm_exist)
{
cmd = xy_2strjoin ("npm config set registry ", source.url);
cmd = xy_strjoin (4, "npm config ", where, "set registry ", source.url);
chsrc_run (cmd);
}