mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-02-02 16:38:31 +08:00
Really no available sources for DockerHub
[Gitee link #I80UDD] [GitHub link #25]
This commit is contained in:
parent
9c132fd244
commit
7337554e53
|
@ -95,7 +95,7 @@ query_mirror_exist (SourceInfo *sources, size_t size, char *target, char *input)
|
|||
|
||||
if (xy_streql ("first", input))
|
||||
{
|
||||
puts ("使用维护团队测速第一的源");
|
||||
puts ("将使用维护团队测速第一的源");
|
||||
return 1; // 返回第2个,因为第1个是上游默认源
|
||||
}
|
||||
|
||||
|
@ -292,7 +292,7 @@ is_upstream (SourceInfo *source)
|
|||
}
|
||||
|
||||
bool
|
||||
source_is_null (SourceInfo *source)
|
||||
source_has_empty_url (SourceInfo *source)
|
||||
{
|
||||
return source->url == NULL;
|
||||
}
|
||||
|
@ -313,12 +313,12 @@ chsrc_confirm_selection (SourceInfo *source)
|
|||
// chsrc 已经规避用户使用未实现的 `chsrc reset`
|
||||
// 但是某些用户可能摸索着强行使用 chsrc set target upstream,从而执行起该禁用的功能,
|
||||
// 之所以禁用,是因为有的 reset 我们并没有实现,我们在这里阻止这些邪恶的用户
|
||||
if (is_upstream (source) && source_is_null (source))
|
||||
if (is_upstream (source) && source_has_empty_url (source))
|
||||
{
|
||||
chsrc_error ("暂未对该软件实现重置");
|
||||
exit (2);
|
||||
}
|
||||
else if (source_is_null (source))
|
||||
else if (source_has_empty_url (source))
|
||||
{
|
||||
chsrc_error ("该源URL不存在,请向开发团队提交bug");
|
||||
exit (2);
|
||||
|
|
|
@ -793,6 +793,20 @@ wr_cocoapods_sources[] = {
|
|||
{&Bfsu, "https://mirrors.bfsu.edu.cn/git/CocoaPods/Specs.git"}
|
||||
},
|
||||
|
||||
/**
|
||||
* 2024-06-08 更新
|
||||
*
|
||||
* @note USTC 与 SJTUG 于 2024-06-06 停止支持 DockerHub
|
||||
* @note NJU 于 2024-06-07 停止支持 DockerHub
|
||||
*
|
||||
* 参考:https://gist.github.com/y0ngb1n/7e8f16af3242c7815e7ca2f0833d3ea6
|
||||
*/
|
||||
wr_dockerhub_sources[] = {
|
||||
{&Upstream, NULL},
|
||||
// {&Ustc, "https://docker.mirrors.ustc.edu.cn/"},
|
||||
},
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 2023-09-11 更新
|
||||
|
@ -904,6 +918,7 @@ def_sources_n(os_ros);
|
|||
|
||||
def_sources_n(wr_winget);
|
||||
def_sources_n(wr_brew); def_sources_n(wr_cocoapods);
|
||||
def_sources_n(wr_dockerhub);
|
||||
def_sources_n(wr_flathub);
|
||||
def_sources_n(wr_nix); def_sources_n(wr_guix);
|
||||
def_sources_n(wr_tex); def_sources_n(wr_emacs);
|
||||
|
|
|
@ -1984,9 +1984,9 @@ wr_dockerhub_getsrc (char *option)
|
|||
void
|
||||
wr_dockerhub_setsrc (char *option)
|
||||
{
|
||||
int index = use_specific_mirror_or_auto_select (option, wr_nix);
|
||||
int index = use_specific_mirror_or_auto_select (option, wr_dockerhub);
|
||||
|
||||
SourceInfo source = wr_nix_sources[index];
|
||||
SourceInfo source = wr_dockerhub_sources[index];
|
||||
chsrc_confirm_selection (&source);
|
||||
|
||||
if (xy_on_linux || xy_on_bsd)
|
||||
|
|
Loading…
Reference in New Issue
Block a user