]> diplodocus.org Git - nmh/commitdiff
Oops, stop showbuildenv reading from stdin when run from a TTY.
authorRalph Corderoy <ralph@inputplus.co.uk>
Fri, 21 Oct 2016 19:23:55 +0000 (20:23 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Fri, 21 Oct 2016 19:39:34 +0000 (20:39 +0100)
David spotted the problem I introduced with 8374c3c.  Alter offset to
process any arguments, falling back to stdin if none.

tools/showbuildenv

index 4645049..10c29bb 100755 (executable)
@@ -14,7 +14,7 @@
 # It jumps through hoops with `|| true' despite not using `set -e'.
 
 offset () {
-    sed -e '/./s/^/    /'
+    sed -e '/./s/^/    /' "$@"
 }
 
 header () {