mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 00:22:28 +02:00
Only ask for bash on OS X
This commit is contained in:
@@ -154,12 +154,18 @@ binary for temporary key/certificate generation.""".replace("\n", "")
|
|||||||
if self.conf("test-mode"):
|
if self.conf("test-mode"):
|
||||||
logger.debug("Test mode. Executing the manual command: %s", command)
|
logger.debug("Test mode. Executing the manual command: %s", command)
|
||||||
try:
|
try:
|
||||||
|
# sh shipped with OS X does't support echo -n
|
||||||
|
if sys.platform == "darwin":
|
||||||
|
executable = "/bin/bash"
|
||||||
|
else:
|
||||||
|
executable = "/bin/sh"
|
||||||
|
|
||||||
self._httpd = subprocess.Popen(
|
self._httpd = subprocess.Popen(
|
||||||
command,
|
command,
|
||||||
# don't care about setting stdout and stderr,
|
# don't care about setting stdout and stderr,
|
||||||
# we're in test mode anyway
|
# we're in test mode anyway
|
||||||
shell=True,
|
shell=True,
|
||||||
executable="/bin/bash",
|
executable=executable,
|
||||||
# "preexec_fn" is UNIX specific, but so is "command"
|
# "preexec_fn" is UNIX specific, but so is "command"
|
||||||
preexec_fn=os.setsid)
|
preexec_fn=os.setsid)
|
||||||
except OSError as error: # ValueError should not happen!
|
except OSError as error: # ValueError should not happen!
|
||||||
|
|||||||
Reference in New Issue
Block a user