[Bps-public-commit] SD branch, master, updated. 1f899363a5fa4e3c62fc18cce7ad92fc63bd95af

Alex M Vandiver alexmv at bestpractical.com
Mon Apr 27 13:53:52 EDT 2009


The branch, master has been updated
       via  1f899363a5fa4e3c62fc18cce7ad92fc63bd95af (commit)
      from  020c104f011e1b81ef501c1a5dcbde41a63a6baf (commit)

Summary of changes:
 lib/App/SD/CLI/Dispatcher.pm |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

- Log -----------------------------------------------------------------
commit 1f899363a5fa4e3c62fc18cce7ad92fc63bd95af
Author: Alex Vandiver <alexmv at mit.edu>
Date:   Mon Apr 27 13:53:39 2009 -0400

    Failure to have a database should actually exit immediately

diff --git a/lib/App/SD/CLI/Dispatcher.pm b/lib/App/SD/CLI/Dispatcher.pm
index 3f1a74a..1b98ccd 100644
--- a/lib/App/SD/CLI/Dispatcher.pm
+++ b/lib/App/SD/CLI/Dispatcher.pm
@@ -51,12 +51,11 @@ on qr'.*' => sub {
     my $self = shift;
     my $command = $_;
     next_rule if $command =~ /^(?:shell|clone|init)$/;
-    if ( !$self->cli->app_handle->handle->replica_exists ) {
-        print join("\n","No SD database was found at " . $self->cli->app_handle->handle->url(),
-            qq{Type "$0 help init" or "$0 help environment" for tips on how to sort that out.});
-    }
+    next_rule if $self->cli->app_handle->handle->replica_exists;
 
-    next_rule;
+    print join("\n","No SD database was found at " . $self->cli->app_handle->handle->url(),
+               qq{Type "$0 help init" or "$0 help environment" for tips on how to sort that out.});
+    exit 1;
 };
 
 

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list