[libcode-tidyall-perl] 266/374: remove long pathname from errors

Jonas Smedegaard js at alioth.debian.org
Sun Sep 29 22:26:32 UTC 2013


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository libcode-tidyall-perl.

commit 9b492f13af34b53a24bbc4a57d434b79766aaa21
Author: Jonathan Swartz <swartz at pobox.com>
Date:   Tue Sep 25 21:16:16 2012 -0700

    remove long pathname from errors
---
 lib/Code/TidyAll/Plugin/JSHint.pm |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/Code/TidyAll/Plugin/JSHint.pm b/lib/Code/TidyAll/Plugin/JSHint.pm
index 246a711..b36cf93 100644
--- a/lib/Code/TidyAll/Plugin/JSHint.pm
+++ b/lib/Code/TidyAll/Plugin/JSHint.pm
@@ -32,7 +32,10 @@ sub validate_file {
 
     my $cmd = sprintf( "%s %s %s", $self->cmd, $self->argv, $file );
     my $output = capture_merged { system($cmd) };
-    die "$output\n" if $output =~ /\S/;
+    if ( $output =~ /\S/ ) {
+        $output =~ s/^$file:\s*//gm;
+        die "$output\n";
+    }
 }
 
 1;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcode-tidyall-perl.git



More information about the Pkg-perl-cvs-commits mailing list