mirror of
https://github.com/RubyMetric/chsrc
synced 2025-10-10 06:03:24 +08:00
Quiet and noisy at your disposal
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -67,7 +67,7 @@ os_freebsd_setsrc (char *option)
|
||||
// @ccmywish: [2023-09-27] 据 @ykla , NJU的freebsd-ports源没有设置 Git,
|
||||
// 但是我认为由于使用Git还是要比非Git方便许多,我们尽可能坚持使用Git
|
||||
// 而 gitup 又要额外修改它自己的配置,比较麻烦
|
||||
bool git_exist = query_program_exist (xy_str_to_quietcmd ("git version"), "git");
|
||||
bool git_exist = query_program_exist (xy_str_to_quietcmd ("git version"), "git", Noisy_When_Exist|Noisy_When_NonExist);
|
||||
if (git_exist)
|
||||
{
|
||||
if (xy_streql("nju",source.mirror->code))
|
||||
|
Reference in New Issue
Block a user