Bug 1147271 - Add ssh option to prevent hanging on password prompt in upload.py. r=mshal, a=release
authorChris Manchester <cmanchester@mozilla.com>
Thu, 11 May 2017 09:40:58 -0700
changeset 578490 343fd92635d901051872aeb94cd32a7d8d45290f
parent 578489 502b6aa6fe4aec910532947d4c2af428656edd3b
child 578491 366cdd623cfb33ca7c1cec2fbd637910af7fd5d4
push id58939
push userbmo:cku@mozilla.com
push dateTue, 16 May 2017 04:17:59 +0000
reviewersmshal, release
bugs1147271
milestone52.1.2
Bug 1147271 - Add ssh option to prevent hanging on password prompt in upload.py. r=mshal, a=release MozReview-Commit-ID: Lmg5SAtLuE3
build/upload.py
--- a/build/upload.py
+++ b/build/upload.py
@@ -85,16 +85,18 @@ def AppendOptionalArgsToSSHCommandline(c
     commandline arguments to the list cmdline if the values are not None."""
     if port is not None:
         cmdline.append("-P%d" % port)
     if ssh_key is not None:
         # Don't interpret ~ paths - ssh can handle that on its own
         if not ssh_key.startswith('~'):
             ssh_key = WindowsPathToMsysPath(ssh_key)
         cmdline.extend(["-o", "IdentityFile=%s" % ssh_key])
+    # In case of an issue here we don't want to hang on a password prompt.
+    cmdline.extend(["-o", "BatchMode=yes"])
 
 def DoSSHCommand(command, user, host, port=None, ssh_key=None):
     """Execute command on user@host using ssh. Optionally use
     port and ssh_key, if provided."""
     cmdline = ["ssh"]
     AppendOptionalArgsToSSHCommandline(cmdline, port, ssh_key)
     cmdline.extend(["%s@%s" % (user, host), command])