Remove chef_forbid_local_mode()

This commit is contained in:
Aoran Zeng 2025-08-11 03:06:53 +08:00
parent 492ca4288c
commit 52004a1033
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
6 changed files with 11 additions and 15 deletions

View File

@ -51,17 +51,13 @@ chef_allow_local_mode (Target_t *target, Capability_t cap, const char *explain_z
return;
}
target->cap_local_explain = xy_strdup (CHINESE ? explain_zh : explain_en);
}
void
chef_forbid_local_mode (Target_t *target)
{
if (!target)
return;
target->cap_local = CanNot;
if (cap == CanNot)
{
target->cap_local_explain = xy_strdup (CHINESE ? "无法进行项目级换源" : "Unable to perform project-level source switching");
return;
}
target->cap_local_explain = xy_strdup (CHINESE ? explain_zh : explain_en);
}

View File

@ -21,7 +21,7 @@ pl_dart_flutter_prelude (void)
"czyt", "czyt.go@gmail.com",
"MadDogOwner", "xiaoran@xrgzs.top");
chef_forbid_local_mode (this);
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_allow_english(this);
chef_allow_user_define(this);

View File

@ -62,7 +62,7 @@ pl_js_nodejs_binary_prelude (void)
chef_set_cooks (this, 0);
chef_set_contributors (this, 0);
chef_forbid_local_mode (this);
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_allow_english(this);
chef_allow_user_define(this);

View File

@ -19,7 +19,7 @@ pl_js_nvm_prelude (void)
chef_set_cooks (this, 0);
chef_set_contributors (this, 0);
chef_forbid_local_mode (this);
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_allow_english(this);
chef_allow_user_define(this);

View File

@ -19,7 +19,7 @@ pl_python_pip_prelude (void)
chef_set_cooks (this, 0);
chef_set_contributors (this, 0);
chef_forbid_local_mode (this);
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_allow_english(this);
chef_allow_user_define(this);

View File

@ -24,7 +24,7 @@ pl_rust_rustup_prelude (void)
"Yangmoooo", "yangmoooo@outlook.com",
"Mikachu2333", "mikachu.23333@zohomail.com");
chef_forbid_local_mode (this);
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_forbid_english (this);
chef_allow_user_define(this);