diff --git a/src/recipe/lang/Python/PDM.c b/src/recipe/lang/Python/PDM.c index 716f1c5..c87b4a3 100644 --- a/src/recipe/lang/Python/PDM.c +++ b/src/recipe/lang/Python/PDM.c @@ -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); } diff --git a/src/recipe/lang/Python/Poetry.c b/src/recipe/lang/Python/Poetry.c index c37969f..9e5be5f 100644 --- a/src/recipe/lang/Python/Poetry.c +++ b/src/recipe/lang/Python/Poetry.c @@ -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); } diff --git a/src/recipe/lang/Python/Python.c b/src/recipe/lang/Python/Python.c index 8190f63..f6e68cd 100644 --- a/src/recipe/lang/Python/Python.c +++ b/src/recipe/lang/Python/Python.c @@ -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 `**\n" - : "**将同时为您更换3个包管理器 pip, Poetry, PDM 的源,若需要独立换源,请独立运行 chsrc set **\n"; - chsrc_log (bdyellow(msg)); + "please run independently `chsrc set `" + : "将同时为您更换3个包管理器 pip, Poetry, PDM 的源,若需要独立换源,请独立运行 chsrc set "; + 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 diff --git a/src/recipe/lang/Python/pip.c b/src/recipe/lang/Python/pip.c index f481eb1..b2efe11 100644 --- a/src/recipe/lang/Python/pip.c +++ b/src/recipe/lang/Python/pip.c @@ -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); }