Support -local for composer

[Gitee link #I9V5I0]
This commit is contained in:
Aoran Zeng 2024-06-11 22:18:35 +08:00
parent 7d72955c56
commit 36c80c8c1e

View File

@ -364,7 +364,13 @@ pl_php_setsrc (char *option)
SourceInfo source = pl_php_sources[index];
chsrc_confirm_selection (&source);
char* cmd = xy_2strjoin ("composer config -g repo.packagist composer ", source.url);
char *where = " -g ";
if (Cli_Option_Locally==true)
{
where = " ";
}
char *cmd = xy_strjoin (4, "composer config", where, "repo.packagist composer ", source.url);
chsrc_run (cmd);
chsrc_say_lastly (&source, ChsrcTypeSemiAuto);