Use new xy_run and add a placeholder URL

This commit is contained in:
Aoran Zeng
2024-06-11 17:05:15 +08:00
parent cb87e7d09c
commit a2dcaf03ed
2 changed files with 10 additions and 9 deletions

View File

@@ -185,7 +185,7 @@ test_speed_url (const char *url)
// chsrc_info (xy_2strjoin ("测速命令 ", curl_cmd));
char *buf = xy_getcmd (curl_cmd, 0, NULL);
char *buf = xy_run (curl_cmd, 0, NULL);
// 如果尾部有换行,删除
buf = xy_str_strip (buf);
@@ -414,7 +414,7 @@ chsrc_ensure_root ()
char *euid = getenv ("$EUID");
if (NULL==euid)
{
char *buf = xy_getcmd ("id -u", 0, NULL);
char *buf = xy_run ("id -u", 0, NULL);
if (0!=atoi(buf)) goto not_root;
else return;
}