内部使用新的状态变量判断scope

This commit is contained in:
Aoran Zeng
2026-02-22 21:43:46 +08:00
parent 708092aab2
commit 0b5efcb77d
13 changed files with 20 additions and 24 deletions

View File

@@ -47,7 +47,7 @@ pl_python_pdm_setsrc (char *option)
char *cmd = NULL;
if (chsrc_in_local_mode())
if (chsrc_in_project_scope_mode())
cmd = xy_2strcat ("pdm config --local pypi.url ", source.url);
else
cmd = xy_2strcat ("pdm config --global pypi.url ", source.url);

View File

@@ -43,7 +43,7 @@ pl_python_poetry_setsrc (char *option)
char *cmd = NULL;
if (!chsrc_in_local_mode())
if (!chsrc_in_project_scope_mode())
chsrc_alert2 ("Poetry 仅支持项目级换源");
cmd = xy_2strcat ("poetry source add my_mirror ", source.url);

View File

@@ -60,7 +60,7 @@ void
pl_python_pip_setsrc (char *option)
{
// 对于不支持的情况,尽早结束
if (chsrc_in_local_mode())
if (chsrc_in_project_scope_mode())
{
char *msg = ENGLISH ? "pip doesn't support `-local`. SKIP changing source!" : "pip 不支持 -local跳过换源";
chsrc_error (msg);

View File

@@ -43,7 +43,7 @@ pl_python_uv_prelude (void)
char *
pl_python_find_uv_config (bool mkdir)
{
if (chsrc_in_local_mode())
if (chsrc_in_project_scope_mode())
{
return xy_2strcat (PL_Python_uv_Local_ConfigPath, PL_Python_uv_ConfigFile);
}