← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~doismellburning/launchpad:bail-on-fail-on-db-setup into launchpad:master

 

Kristian Glass has proposed merging ~doismellburning/launchpad:bail-on-fail-on-db-setup into launchpad:master.

Commit message:
Exit on failure in launchpad-database-setup

Let's avoid:
    
    Creating postgresql user runner
    createuser: could not connect to database postgres
    
    Looks like everything went ok.


Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~doismellburning/launchpad/+git/launchpad/+merge/387647
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~doismellburning/launchpad:bail-on-fail-on-db-setup into launchpad:master.
diff --git a/utilities/launchpad-database-setup b/utilities/launchpad-database-setup
index 0b893de..e131a78 100755
--- a/utilities/launchpad-database-setup
+++ b/utilities/launchpad-database-setup
@@ -3,6 +3,8 @@
 # Copyright 2009-2012 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
+set -e  # Exit immediately if a command exits with a non-zero status.
+
 if [ -n "$1" ]; then
     USER=$1
     echo "Creating Launchpad database for $USER"