Skip pip when -local

[GitHub #79]
This commit is contained in:
Aoran Zeng
2024-09-13 19:33:00 +08:00
parent 48cefa1b1d
commit 7901491c39
3 changed files with 42 additions and 43 deletions

View File

@@ -50,6 +50,15 @@ pl_python_pip_getsrc (char *option)
void
pl_python_pip_setsrc (char *option)
{
// 对于不支持的情况,尽早结束
if (CliOpt_Locally)
{
char *msg = CliOpt_InEnglish ? "pip doesn't support `-local`. SKIP changing source!" : "pip 不支持 -local跳过换源";
chsrc_error (msg);
// 不能直接退出,因为 Leader target 不能就此结束
return;
}
chsrc_yield_source_and_confirm (pl_python_pip);
char *py_prog_name = NULL;