Concise output for group Python

[GitHub #79]
This commit is contained in:
Aoran Zeng 2024-09-14 03:48:42 +08:00
parent 4c993bac04
commit 394bcda1b3
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
4 changed files with 11 additions and 8 deletions

View File

@ -42,7 +42,8 @@ pl_python_pdm_setsrc (char *option)
chsrc_run (cmd, RunOpt_No_Last_New_Line);
chsrc_conclude (&source, ChsrcTypeAuto);
if (ProgMode_Target_Group!=true)
chsrc_conclude (&source, ChsrcTypeAuto);
}

View File

@ -40,7 +40,8 @@ pl_python_poetry_setsrc (char *option)
cmd = xy_2strjoin ("poetry source add my_mirror ", source.url);
chsrc_run (cmd, RunOpt_No_Last_New_Line);
chsrc_conclude (&source, ChsrcTypeAuto);
if (ProgMode_Target_Group!=true)
chsrc_conclude (&source, ChsrcTypeAuto);
}

View File

@ -38,11 +38,11 @@ void
pl_python_setsrc (char *option)
{
{
char *msg = CliOpt_InEnglish ? "**Three package managers will be replaced for you at the same time: " \
char *msg = CliOpt_InEnglish ? "Three package managers will be replaced for you at the same time: " \
"pip, Poetry, PDM. If you need to change the source independently, " \
"please run independently `chsrc set <pkg-manager>`**\n"
: "**将同时为您更换3个包管理器 pip, Poetry, PDM 的源,若需要独立换源,请独立运行 chsrc set <pkg-manager>**\n";
chsrc_log (bdyellow(msg));
"please run independently `chsrc set <pkg-manager>`"
: "将同时为您更换3个包管理器 pip, Poetry, PDM 的源,若需要独立换源,请独立运行 chsrc set <pkg-manager>";
chsrc_note2 (msg);
}
char *chsrc_type = xy_streql (option, ChsrcTypeReset) ? ChsrcTypeReset : ChsrcTypeAuto;
@ -71,7 +71,7 @@ pl_python_setsrc (char *option)
pl_python_pdm_setsrc (option);
}
// chsrc_conclude (&source, chsrc_type);
chsrc_conclude (&source, chsrc_type);
}
void

View File

@ -52,7 +52,8 @@ pl_python_pip_setsrc (char *option)
char *cmd = xy_2strjoin (py_prog_name, xy_2strjoin (" -m pip config --user set global.index-url ", source.url));
chsrc_run (cmd, RunOpt_No_Last_New_Line);
chsrc_conclude (&source, ChsrcTypeAuto);
if (ProgMode_Target_Group!=true)
chsrc_conclude (&source, ChsrcTypeAuto);
}