Parcourir la source

git-notify: Don't abort if mail(1) exits non-zero

As nothing in git-notify depends on the success of the mail(1) call,
don't abort if it fails, just spit out a warning.
Holger Weiss il y a 16 ans
Parent
commit
9e68689179
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      tools/git-notify

+ 1 - 1
tools/git-notify

@@ -307,7 +307,7 @@ sub mail_notification($$$@)
         }
         binmode MAIL, ":utf8";
         print MAIL join("\n", @text), "\n";
-        close MAIL or die $! ? "Cannot execute $mailer: $!" : "$mailer exited with status: $?";
+        close MAIL or warn $! ? "Cannot execute $mailer: $!" : "$mailer exited with status: $?";
     }
 }