[Bps-public-commit] r17512 - Prophet/trunk/lib/Prophet/CLI/Command
jesse at bestpractical.com
jesse at bestpractical.com
Thu Jan 1 21:15:57 EST 2009
Author: jesse
Date: Thu Jan 1 21:15:57 2009
New Revision: 17512
Modified:
Prophet/trunk/lib/Prophet/CLI/Command/Pull.pm
Log:
Better protect the pull command against user erorr
Modified: Prophet/trunk/lib/Prophet/CLI/Command/Pull.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI/Command/Pull.pm (original)
+++ Prophet/trunk/lib/Prophet/CLI/Command/Pull.pm Thu Jan 1 21:15:57 2009
@@ -25,7 +25,7 @@
. ":file://"
. $self->handle->fs_root );
- for my $from ( @from, $self->find_bonjour_sources ) {
+ for my $from (grep { defined } ( @from, $self->find_bonjour_sources )) {
print "Pulling from $from\n";
#if ( $self->has_arg('all') || $self->has_arg('local') );
$self->set_arg( from => $from );
@@ -76,6 +76,9 @@
my $self = shift;
my @bonjour_sources;
+ # We can't pull from bonjour sources if we don't have a db yet
+ return undef unless $self->app_handle->handle->replica_exists;
+
my $db_uuid = $self->arg('db_uuid') || $self->app_handle->handle->db_uuid;
if ( $self->has_arg('local') ) {
More information about the Bps-public-commit
mailing list