Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/recipe/ware/WinGet.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ wr_winget_prelude ()
chef_allow_gsr(wr_winget);

chef_set_created_on (this, "2024-06-07");
chef_set_last_updated (this, "2025-07-13");
chef_set_last_updated (this, "2025-08-17");
chef_set_sources_last_updated (this, "2025-07-13");

chef_set_authors (this, 1, "Aoran Zeng", "ccmywish@qq.com");
chef_set_chef (this, NULL, NULL);
chef_set_cooks (this, 0);
chef_set_contributors (this, 0);
chef_set_contributors (this, 1, "Mikachu2333", "mikachu.23333@zohomail.com");

chef_forbid_english(this);
chef_allow_user_define(this);
Expand Down Expand Up @@ -46,9 +46,12 @@ wr_winget_getsrc (char *option)
void
wr_winget_setsrc (char *option)
{
use_this_source(wr_winget);
use_this_source (wr_winget);

chsrc_run ("winget source remove winget", RunOpt_Default);
// 2025.8.17 此前用户可能隐式使用默认源导致 remove 失败,故使用 Dont_Abort
chsrc_run ("winget source remove winget", RunOpt_Dont_Abort_On_Failure);
// 2025.8.18 执行两次相同的命令后继续设置,无报错,换源成功。具体原因不明
chsrc_run ("winget source remove winget", RunOpt_Dont_Abort_On_Failure);
chsrc_run (xy_strjoin (3, "winget source add winget ", source.url, " --trust-level trusted"), RunOpt_Default);

chsrc_determine_chgtype (ChgType_Auto);
Expand Down