This commit is contained in:
crazywhalecc
2025-08-06 20:47:48 +08:00
committed by Jerry Ma
parent 08fa49b791
commit 29dc5e4ea7
8 changed files with 131 additions and 109 deletions

View File

@@ -8,7 +8,6 @@ use SPC\builder\traits\UnixSystemUtilTrait;
use SPC\doctor\AsCheckItem;
use SPC\doctor\AsFixItem;
use SPC\doctor\CheckResult;
use SPC\exception\RuntimeException;
class BSDToolCheckList
{
@@ -56,11 +55,8 @@ class BSDToolCheckList
} else {
$prefix = '';
}
try {
shell(true)->exec("ASSUME_ALWAYS_YES=yes {$prefix}pkg install -y " . implode(' ', $missing));
} catch (RuntimeException) {
return false;
}
shell(true)->exec("ASSUME_ALWAYS_YES=yes {$prefix}pkg install -y " . implode(' ', $missing));
return true;
}
}