mirror of
https://github.com/RubyMetric/chsrc
synced 2026-03-05 05:30:41 +08:00
内部使用新的状态变量判断scope
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user