mirror of
https://github.com/RubyMetric/chsrc
synced 2025-12-20 02:47:44 +08:00
Support -local for npm
[Gitee link #I9V5I0]
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user