Bug 42551: Skip preload when running perl with -c
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
8ef30ca3fb
commit
1648db7a84
|
|
@ -47,9 +47,10 @@ BEGIN {
|
|||
pop @INC if $INC[-1] eq '.';
|
||||
|
||||
# Load plugins early to ensure they're available before any transactions begin
|
||||
# Skip under "perl -c" to avoid C3 error when syntax checking plugins
|
||||
my $enable_plugins = C4::Context->config("enable_plugins") // 0;
|
||||
|
||||
if ($enable_plugins) {
|
||||
if ( $enable_plugins && !$^C ) {
|
||||
require Koha::Plugins::Loader;
|
||||
Koha::Plugins::Loader->get_enabled_plugins();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue