← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~doismellburning/lp-signing:feature/exit-with-error-on-setup-fail into lp-signing:master

 

Kristian Glass has proposed merging ~doismellburning/lp-signing:feature/exit-with-error-on-setup-fail into lp-signing:master.

Commit message:
Exit setup-container with explicit non-zero status on failure

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~doismellburning/lp-signing/+git/lp-signing/+merge/387133
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~doismellburning/lp-signing:feature/exit-with-error-on-setup-fail into lp-signing:master.
diff --git a/setup-container b/setup-container
index 958757b..245ba16 100755
--- a/setup-container
+++ b/setup-container
@@ -4,14 +4,14 @@
 # Barf if not uid 0
 if [ $(id -u) -ne "0" ]; then
    echo "Please run me with sudo"
-   exit
+   exit 1
 fi
 # Barf if not in container, to avoid hosing user's system
 # Note this needs to be run as root (but at this point we should be under
 # sudo anyway).
 if ! grep -qa container=lxc /proc/1/environ; then
     echo "You're not in an LXC container, so I'm refusing to run."
-    exit
+    exit 1
 fi
 
 # Disable debconf questions.