From eb5a6fc7c3120df69b2b370bd1a22d8086fa5272 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 18 Nov 2015 17:32:40 -0800 Subject: [PATCH] communicators/ssh: more nil guards [GH-6225] --- CHANGELOG.md | 1 + plugins/communicators/ssh/communicator.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b910da20b..67eb80968 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ BUG FIXES: - core: use the correct private key when packaging a box [GH-6406] - commands/rdp: prefer `xfreerdp` if it is available on Linux [GH-6475] - commands/up: the `--provision-with` flag works with provisioner names [GH-5981] + - communicator/ssh: fix potential crash case with PTY [GH-6225] - communicator/winrm: respect `boot_timeout` setting [GH-6229] - communicator/winrm: execute scheduled tasks immediately on Windows XP since elevation isn't required [GH-6195] diff --git a/plugins/communicators/ssh/communicator.rb b/plugins/communicators/ssh/communicator.rb index 035ef5f61..40f49e82c 100644 --- a/plugins/communicators/ssh/communicator.rb +++ b/plugins/communicators/ssh/communicator.rb @@ -611,6 +611,7 @@ module VagrantPlugins end data = pty_stdout[/.*#{PTY_DELIM_START}(.*?)#{PTY_DELIM_END}/m, 1] + data ||= "" @logger.debug("PTY stdout parsed: #{data}") yield :stdout, data if block_given? end