Adjust chsrc_conclude()

This commit is contained in:
Aoran Zeng
2024-11-22 09:08:32 +08:00
parent 6a59ec51e1
commit 722de55ecb
65 changed files with 234 additions and 124 deletions

View File

@@ -43,7 +43,10 @@ pl_python_pdm_setsrc (char *option)
chsrc_run (cmd, RunOpt_No_Last_New_Line);
if (ProgMode_Target_Group!=true)
chsrc_conclude (&source, SetsrcType_Auto);
{
ProgMode_ChgType = ProgMode_CMD_Reset ? ChgType_Reset : ChgType_Auto;
chsrc_conclude (&source);
}
}
@@ -53,7 +56,7 @@ pl_python_pdm_setsrc (char *option)
void
pl_python_pdm_resetsrc (char *option)
{
pl_python_pdm_setsrc (SetsrcType_Reset);
pl_python_pdm_setsrc (option);
}

View File

@@ -41,7 +41,10 @@ pl_python_poetry_setsrc (char *option)
chsrc_run (cmd, RunOpt_No_Last_New_Line);
if (ProgMode_Target_Group!=true)
chsrc_conclude (&source, SetsrcType_Auto);
{
ProgMode_ChgType = ProgMode_CMD_Reset ? ChgType_Reset : ChgType_Auto;
chsrc_conclude (&source);
}
}
@@ -51,7 +54,7 @@ pl_python_poetry_setsrc (char *option)
void
pl_python_poetry_resetsrc (char *option)
{
pl_python_poetry_setsrc (SetsrcType_Reset);
pl_python_poetry_setsrc (option);
}

View File

@@ -45,8 +45,6 @@ pl_python_setsrc (char *option)
chsrc_note2 (msg);
}
char *setsrc_type = xy_streql (option, SetsrcType_Reset) ? SetsrcType_Reset : SetsrcType_Auto;
bool pdm_exist = false,
poetry_exist = false;
@@ -71,13 +69,14 @@ pl_python_setsrc (char *option)
pl_python_pdm_setsrc (option);
}
chsrc_conclude (&source, setsrc_type);
ProgMode_ChgType = ProgMode_CMD_Reset ? ChgType_Reset : ChgType_Auto;
chsrc_conclude (&source);
}
void
pl_python_resetsrc (char *option)
{
pl_python_setsrc (SetsrcType_Reset);
pl_python_setsrc (option);
}

View File

@@ -53,7 +53,10 @@ pl_python_pip_setsrc (char *option)
chsrc_run (cmd, RunOpt_No_Last_New_Line);
if (ProgMode_Target_Group!=true)
chsrc_conclude (&source, SetsrcType_Auto);
{
ProgMode_ChgType = ProgMode_CMD_Reset ? ChgType_Reset : ChgType_Auto;
chsrc_conclude (&source);
}
}
@@ -63,7 +66,7 @@ pl_python_pip_setsrc (char *option)
void
pl_python_pip_resetsrc (char *option)
{
pl_python_pip_setsrc (SetsrcType_Reset);
pl_python_pip_setsrc (option);
}