mirror of
https://github.com/RubyMetric/chsrc
synced 2025-06-09 04:16:21 +08:00
Support -local
for npm
[Gitee link #I9V5I0]
This commit is contained in:
parent
076b4e77f3
commit
7d72955c56
@ -252,9 +252,15 @@ pl_nodejs_setsrc (char *option)
|
|||||||
|
|
||||||
char *cmd = NULL;
|
char *cmd = NULL;
|
||||||
|
|
||||||
|
char *where = "";
|
||||||
|
if (Cli_Option_Locally==true)
|
||||||
|
{
|
||||||
|
where = "--location project ";
|
||||||
|
}
|
||||||
|
|
||||||
if (npm_exist)
|
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);
|
chsrc_run (cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user