[svk-commit] r2717 - in trunk: lib/SVK

nobody at bestpractical.com nobody at bestpractical.com
Wed Mar 26 14:03:09 EDT 2008


Author: jesse
Date: Wed Mar 26 14:03:08 2008
New Revision: 2717

Modified:
   trunk/   (props changed)
   trunk/lib/SVK/Util.pm

Log:
 r28612 at 31b:  jesse | 2008-03-26 14:02:46 -0400
     From:   eichin at metacarta.com
     Subject:    [svk-devel] patch to prevent failure when you don't have a tty
     Date:   March 25, 2008 2:39:52 PM EDT
 
 Term::ReadKey::GetControlChars blows out with "Unable to read terminal
 settings in GetControlChars" if STDIN is not a tty, which happens more
 often than you'd think (this bit me once when trying to pipe "yes
 skip" to svk, and another time when running svk in a debian-lenny
 chroot without /dev/pts bindmounted.)  Term::ReadKey::ReadKey and the
 rest work fine on a pipe, though, once you get past the blowout (and
 if you don't have a tty, you probably don't care about simulating
 erase-handling anyway.)
 


Modified: trunk/lib/SVK/Util.pm
==============================================================================
--- trunk/lib/SVK/Util.pm	(original)
+++ trunk/lib/SVK/Util.pm	Wed Mar 26 14:03:08 2008
@@ -193,7 +193,7 @@
     my $out = (IS_WIN32 ? sub { 1 } : sub { print @_ });
 
     my $erase;
-    if (!IS_WIN32) {
+    if (!IS_WIN32 && -t) {
        my %keys = Term::ReadKey::GetControlChars();
        $erase = $keys{ERASE};
     }


More information about the svk-commit mailing list