diff --git a/ci-tools/update-nixpkgs b/ci-tools/update-nixpkgs
index 76f74a2e1848d1504af6925ae1991fdf335ad80f..d4afb21ff9689bd599d1d0fd2ca08089f8767d87 100755
--- a/ci-tools/update-nixpkgs
+++ b/ci-tools/update-nixpkgs
@@ -54,8 +54,11 @@ main() {
     checkout_source_branch "$SSHKEY" "$SERVER_HOST" "$PROJECT_PATH" "$DEFAULT_BRANCH" "$SOURCE_BRANCH"
     build "result-before"
 
-    # If nothing changed, update_nixpkgs will just exit for us.
-    update_nixpkgs
+    # If nothing changed, report this and exit without an error.
+    if ! update_nixpkgs; then
+	echo "No changes."
+	exit 0
+    fi
 
     build "result-after"
     local DIFF=$(compute_diff "./result-before" "./result-after")
@@ -156,11 +159,10 @@ update_nixpkgs() {
     # file instead of the one that's part of its own checkout.
     nix-shell ../shell.nix --run 'update-nixpkgs ${PWD}/nixpkgs.json'
 
-    # Show us what we did - and signal a kind of error if we did nothing
-    # (expected in the case where nixpkgs hasn't changed since we last ran).
+    # Signal a kind of error if we did nothing (expected in the case where
+    # nixpkgs hasn't changed since we last ran).
     if git diff --exit-code; then
-	echo "No changes."
-	exit 0
+	return 1
     fi
 }