generate plugin: only print error header if there are errors
Matt S Trout [Tue, 23 Oct 2012 19:54:11 +0000 (19:54 +0000)]
lib/App/SCS/Plugin/Generate.pm

index d36568a..b48fd01 100644 (file)
@@ -49,7 +49,7 @@ sub run_command_generate (dir=s;host=s;only=s) {
             ." for path ${path}";
     $dir->catfile("index.${ext}")->print($res->content);
   }
-  warn "\nERRORS GENERATING PAGES:\n";
+  warn "\nERRORS GENERATING PAGES:\n" if @fail;
   foreach my $fail (@fail) {
     my ($path, $res) = @$fail;
     warn "\nFailed to generate ${path}:\n";