Skip to content

Commit

Permalink
Item13599: Don't skip files if no session
Browse files Browse the repository at this point in the history
Extension installer tries to check-in topics that have history in the
store, or are flagged to checkin in the manifest.  When the installer
is run from the CLI though, there is no session and checkin won't work,
so it skips the file.

Just copy the file if no session available.
  • Loading branch information
gac410 committed Aug 3, 2015
1 parent cbceb8c commit 83229de
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/lib/Foswiki/Configure/Package.pm
Expand Up @@ -899,9 +899,12 @@ sub _install {
my $perms = $manifest->{$file}->{perms}; # File permissions

# Topic files in the data directory needing Checkin
# SMELL
# SMELL: This only can checkin when a SESSION exists. This won't
# work in CLI environment, so we are forced to skip this and just
# copy the file directly.
if (
$file =~ m/^data/ # File for the data directory
&& $Foswiki::Plugins::SESSION
&& (
-e "$target,v" # rcs history file exists
|| -e "$target,pfv" # pfv versions directory exists
Expand Down Expand Up @@ -944,7 +947,7 @@ sub _install {
next;
}

if ( $contents && $Foswiki::Plugins::SESSION ) {
if ($contents) {
$reporter->NOTE(
"> ${simulated}Checked in: $file as $tweb.$ttopic")
if DEBUG;
Expand Down

0 comments on commit 83229de

Please sign in to comment.