全部使用 xy_strcat() 弃用 xy_strjoin()

This commit is contained in:
Aoran Zeng
2025-08-20 18:32:30 +08:00
parent aabec77833
commit 0d232fba92
65 changed files with 200 additions and 205 deletions

View File

@@ -62,7 +62,7 @@ pl_js_bun_setsrc (char *option)
}
else
{
chsrc_note2 (xy_strjoin (3, "请手动写入以下内容到 ", xy_normalize_path ("~/.bunfig.toml"), " 文件中"));
chsrc_note2 (xy_strcat (3, "请手动写入以下内容到 ", xy_normalize_path ("~/.bunfig.toml"), " 文件中"));
}
println (content);

View File

@@ -68,9 +68,9 @@ pl_js_yarn_setsrc (char *option)
if (pl_js_yarn_get_yarn_version () >= 2)
{
if (chsrc_in_local_mode()) // Yarn 默认情况下就是基于本项目换源
cmd = xy_2strjoin ("yarn config set npmRegistryServer ", source.url);
cmd = xy_2strcat ("yarn config set npmRegistryServer ", source.url);
else
cmd = xy_2strjoin ("yarn config set npmRegistryServer --home ", source.url);
cmd = xy_2strcat ("yarn config set npmRegistryServer --home ", source.url);
chsrc_run (cmd, RunOpt_No_Last_New_Line);
}
@@ -84,7 +84,7 @@ pl_js_yarn_setsrc (char *option)
return;
}
// 不再阻止换源命令输出到终端,即不再调用 xy_str_to_quietcmd()
cmd = xy_2strjoin ("yarn config set registry ", source.url);
cmd = xy_2strcat ("yarn config set registry ", source.url);
chsrc_run (cmd, RunOpt_No_Last_New_Line);
}

View File

@@ -50,9 +50,9 @@ pl_js_npm_setsrc (char *option)
char *cmd = NULL;
if (chsrc_in_local_mode())
cmd = xy_2strjoin ("npm config --location project set registry ", source.url);
cmd = xy_2strcat ("npm config --location project set registry ", source.url);
else
cmd = xy_2strjoin ("npm config set registry ", source.url);
cmd = xy_2strcat ("npm config set registry ", source.url);
chsrc_run (cmd, RunOpt_No_Last_New_Line);

View File

@@ -50,7 +50,7 @@ pl_js_nvm_setsrc (char *option)
{
Source_t source = chsrc_yield_source_and_confirm (&pl_js_nodejs_binary_target, option);
char *w = xy_strjoin (3, "export NVM_NODEJS_ORG_MIRROR=", source.url, "\n");
char *w = xy_strcat (3, "export NVM_NODEJS_ORG_MIRROR=", source.url, "\n");
char *zshrc = xy_zshrc;
char *bashrc = xy_bashrc;

View File

@@ -50,9 +50,9 @@ pl_js_pnpm_setsrc (char *option)
char *cmd = NULL;
if (chsrc_in_local_mode())
cmd = xy_2strjoin ("pnpm config --location project set registry ", source.url);
cmd = xy_2strcat ("pnpm config --location project set registry ", source.url);
else
cmd = xy_2strjoin ("pnpm config -g set registry ", source.url);
cmd = xy_2strcat ("pnpm config -g set registry ", source.url);
chsrc_run (cmd, RunOpt_No_Last_New_Line);