Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Forcibly add /usr/sbin to the PATH before running sendmail.

Should make it work better on platforms that follow FHS, like debian.
  • Loading branch information...
commit b8d3a46dad3ce6f2234c6efd06a978ed0bb00dcc 1 parent 6667771
@mhagander authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 commitmsg.py
View
5 commitmsg.py
@@ -95,7 +95,10 @@ def flush_mail():
if debug == 1:
print msg
else:
- pipe = Popen("sendmail -t", shell=True, stdin=PIPE).stdin
+ env = os.environ
+ # Add /usr/bin to the path, needed on debian
+ env["PATH"] += ":/usr/sbin"
+ pipe = Popen("sendmail -t", shell=True, env=env, stdin=PIPE).stdin
pipe.write(msg.as_string())
pipe.close()
Please sign in to comment.
Something went wrong with that request. Please try again.