Skip to content

Commit 09f1d56

Browse files
happy-gameccmywish
authored andcommitted
feat: 添加一些docker换源的提示信息
1 parent db4def0 commit 09f1d56

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/recipe/ware/Docker-Hub.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
* SPDX-License-Identifier: GPL-3.0-or-later
33
* -------------------------------------------------------------
44
* File Authors : Aoran Zeng <[email protected]>
5-
* Contributors : Nil Null <[email protected]>
6-
* | happy game <[email protected]>
5+
* Contributors : happy game <[email protected]>
76
* Created On : <2024-06-08>
87
* Last Modified : <2024-10-28>
98
* ------------------------------------------------------------*/
@@ -88,7 +87,7 @@ wr_dockerhub_setsrc (char *option)
8887
"\")' ",
8988
WARE_DockerHub_SourceConfig);
9089
char *ret = xy_run(cmd, 0, NULL);
91-
if (ret && strcmp(ret, "null\n") != 0)
90+
if (ret && !xy_streql(ret, "null\n"))
9291
{
9392
chsrc_note2 ("已存在源,无需重复添加");
9493
}
@@ -128,7 +127,9 @@ wr_dockerhub_setsrc (char *option)
128127
// puts (to_add);
129128
if (xy_on_linux)
130129
{
130+
// 由于 systemctl restart docker 会导致所有容器停止,所以不自动重启
131131
chsrc_note2 ("请自行运行: sudo systemctl restart docker");
132+
chsrc_note2 ("该命令会重启所有容器, 请在合适的时机执行");
132133
// puts ("sudo systemctl restart docker");
133134
}
134135
else

0 commit comments

Comments
 (0)