Skip to content

Commit

Permalink
Item14203: Added stop-conditions for checks.
Browse files Browse the repository at this point in the history
If there is $FOSWIKI_HOME/lib/NOCPAN file or $FOSWIKI_NOCPAN is set then
the module will stop _any_ operations.
  • Loading branch information
vrurg committed Nov 8, 2016
1 parent 6bab37a commit f426524
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions core/lib/Foswiki/Aux/Dependencies.pm
Expand Up @@ -231,13 +231,27 @@ sub _say {
| =retryPause= | 1 | Number of seconds to wait between retries |
| =requiredExtensions= | [] | List (arrayref) of extensions required for this app to start. |
---+++ HOW TO BLOCK THE CHECKS
=checkDependencies()= function will do nothing if either of two conditions are met:
* Either there is =NOCPAN= file exists in =lib= subdirectory of the =rootDir=.
* Or FOSWIKI_NOCPAN environment variable exists.
The block is administrativly mandatory; i.e. there is no way to get around it
until these conditions are fullfilled and there is no flag/option of suppres
their effect.
=cut

sub checkDependencies {
my %profile = @_;

return 0 unless _presets( \%profile );

return 1
if -e $profile{rootDir} . "/lib/NOCPAN" || exists $ENV{FOSWIKI_NOCPAN};

$ENV{PERL_CPANM_HOME} = $profile{cpanmHomeDir};

# Read dependencies before validating DEPENDENCIES checksum
Expand Down

0 comments on commit f426524

Please sign in to comment.