尽量消除对 system() 的直接调用

This commit is contained in:
Aoran Zeng
2025-09-12 12:38:26 +08:00
parent 9d1a287f91
commit 7b01893dc8
4 changed files with 9 additions and 10 deletions

View File

@@ -142,7 +142,7 @@ pl_python_uv_setsrc (char *option)
/* 当 uv_config 存在,如果存在 [[index]] 则更新,否则追加到文件末尾 */
char *cmd = xy_str_gsub (RAWSTR_pl_python_test_uv_if_set_source, "@f@", uv_config);
chsrc_ensure_program ("grep");
int status = system (cmd);
int status = xy_run_get_status (cmd);
if (0==status)
{
chsrc_run (update_config_cmd, RunOpt_Default);