Bug 7298: (follow-up) fix uninitialized variable warning
[koha.git] / installer / install.pl
index 419273a..58388cb 100755 (executable)
@@ -185,11 +185,10 @@ elsif ( $step && $step == 3 ) {
         # we have finished, just redirect to mainpage.
         #
         print $query->redirect("/cgi-bin/koha/mainpage.pl");
-        exit 1;
+        exit;
     }
     elsif ( $op && $op eq 'finish' ) {
         $installer->set_version_syspref();
-        $installer->set_indexing_engine(0); # use Zebra
 
         # Installation is finished.
         # We just deny anybody access to install
@@ -312,6 +311,15 @@ elsif ( $step && $step == 3 ) {
         # Not 1st install, the only sub-step : update database
         #
         #Do updatedatabase And report
+
+    if ( ! defined $ENV{PERL5LIB} ) {
+        my $find = "C4/Context.pm";
+        my $path = $INC{$find};
+        $path =~ s/\Q$find\E//;
+        $ENV{PERL5LIB} = "$path:$path/installer";
+        warn "# plack? inserted PERL5LIB $ENV{PERL5LIB}\n";
+    }
+
         my $cmd = C4::Context->config("intranetdir") . "/installer/data/$info{dbms}/updatedatabase.pl";
         my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf) = IPC::Cmd::run(command => $cmd, verbose => 0);