mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2025-04-22 21:35:50 +00:00
Relax extension checks
This makes package-building on Arch simpler
This commit is contained in:
parent
d05ae4ff96
commit
48c940e349
2 changed files with 5 additions and 3 deletions
|
@ -8,7 +8,7 @@ declare(strict_types=1);
|
|||
namespace JKingWeb\Arsse;
|
||||
|
||||
class Arsse {
|
||||
public const VERSION = "0.10.5";
|
||||
public const VERSION = "0.11.0";
|
||||
public const REQUIRED_EXTENSIONS = [
|
||||
"intl", // as this extension is required to prepare formatted messages, its absence will throw a distinct English-only exception
|
||||
"dom",
|
||||
|
|
|
@ -80,10 +80,12 @@ USAGE_TEXT;
|
|||
'help' => false,
|
||||
]);
|
||||
try {
|
||||
// ensure the require extensions are loaded
|
||||
Arsse::checkExtensions(...Arsse::REQUIRED_EXTENSIONS);
|
||||
// reconstitute multi-token commands (e.g. user add) into a single string
|
||||
$cmd = $this->command($args);
|
||||
// ensure the require extensions are loaded, unless we're just generating the default configuration file
|
||||
if ($cmd !== "conf save-defaults") {
|
||||
Arsse::checkExtensions(...Arsse::REQUIRED_EXTENSIONS);
|
||||
}
|
||||
if ($cmd && !in_array($cmd, ["", "conf save-defaults", "daemon"])) {
|
||||
// only certain commands don't require configuration to be loaded; daemon loads configuration after forking (if applicable)
|
||||
$this->loadConf();
|
||||
|
|
Loading…
Add table
Reference in a new issue