Mercurial > hg
changeset 49051:1d6c6ad645e1
mail: don't complain about a multi-word email.method
I want to be able to set email.method to "ssh relay /usr/sbin/sendmail"
without needing an extra trivial shell script.
This works fine since we pass the full command to a shell, except for
validateconfig trying to find it in $PATH.
Differential Revision: https://phab.mercurial-scm.org/D7542
author | Julien Cristau <jcristau@debian.org> |
---|---|
date | Mon, 02 Dec 2019 14:45:00 +0100 |
parents | a85c123c625a |
children | 34cdad07d06d |
files | mercurial/mail.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/mail.py Mon Mar 28 18:53:55 2022 +0200 +++ b/mercurial/mail.py Mon Dec 02 14:45:00 2019 +0100 @@ -260,9 +260,11 @@ ) ) else: - if not procutil.findexe(method): + command = procutil.shellsplit(method) + command = command[0] if command else b'' + if not (command and procutil.findexe(command)): raise error.Abort( - _(b'%r specified as email transport, but not in PATH') % method + _(b'%r specified as email transport, but not in PATH') % command )