Quiet and noisy at your disposal

This commit is contained in:
Aoran Zeng
2024-09-03 20:03:45 +08:00
parent 31b4658477
commit 6831cfaede
4 changed files with 70 additions and 28 deletions

View File

@@ -35,7 +35,7 @@ void
pl_go_check_cmd ()
{
char *check_cmd = xy_str_to_quietcmd ("go version");
bool exist = query_program_exist (check_cmd, "go");
bool exist = query_program_exist (check_cmd, "go", Noisy_When_Exist|Noisy_When_NonExist);
if (!exist)
{

View File

@@ -33,14 +33,9 @@ def_sources_n(pl_nodejs);
void
pl_nodejs_check_cmd (bool *npm_exist, bool *yarn_exist, bool *pnpm_exist)
{
char *check_cmd = xy_str_to_quietcmd ("npm -v");
*npm_exist = query_program_exist (check_cmd, "npm");
check_cmd = xy_str_to_quietcmd ("yarn -v");
*yarn_exist = query_program_exist (check_cmd, "yarn");
check_cmd = xy_str_to_quietcmd ("pnpm -v");
*pnpm_exist = query_program_exist (check_cmd, "pnpm");
*npm_exist = chsrc_check_program ("npm");
*yarn_exist = chsrc_check_program ("yarn");
*pnpm_exist = chsrc_check_program ("yarn");
if (!*npm_exist && !*yarn_exist && !*pnpm_exist)
{