chiark / gitweb /
cvs-adjustroot: properly exit nonzero in case of error. Fixes the first half of ...
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 5 Nov 2016 11:56:19 +0000 (11:56 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 5 Nov 2016 12:24:30 +0000 (12:24 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
scripts/cvs-adjustroot

index 9228086cb87fde318f5ebd65cc6f54d49c6c6438..aa22904c59e6976feaa392eea79f05bf7ac9c16f 100644 (file)
@@ -3,6 +3,8 @@ chiark-utils (4.5.0~iwj5) unstable; urgency=medium
   * cgi-fcgi-interp: correct the copyright header rubric.
   * nntpid: install in /usr/bin.  Closes:#773651.
   * rebuild on current sid: Closes:#811216.
+  * cvs-adjustroot: properly exit nonzero in case of error.
+    Fixes the first half of #839708.
 
  --
 
index 0e128cc4a98548ad2a145f16fd6066bbb2579076..081859fcdb58b6ba60e97d55c65dfd3b054e8855 100755 (executable)
@@ -41,4 +41,12 @@ if $reinvoke; then
        exit 0
 fi
 
-find -path '*/CVS/Root' -exec cvs-adjustroot --reinvoke "$old" "$new" '{}' ';'
+# GNU find provides + exec variants which set exit status and pass
+# multiple arguments, or \; variants which pass one argument but do
+# not set exit status.  So use a separate -exec false + to arrange for
+# nonzero exit status when appropriate.
+
+find   -path '*/CVS/Root'                                              \
+  \(   -exec cvs-adjustroot --reinvoke "$old" "$new" '{}' ';'          \
+  -o   -exec false '{}' +                                              \
+  \)