summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsawanoboly <sawanoboriyu@higanworks.com>2019-06-25 12:29:13 +0900
committersawanoboly <sawanoboriyu@higanworks.com>2019-06-25 12:29:13 +0900
commitc00bf5d692d89a22357f04ba40ee8a9ed4d79798 (patch)
tree47455e09505635d970889408d78c4633047e0c50
parenta4b4416a6123bcfc33d5efffb56e1773951d1ae6 (diff)
downloadchef-c00bf5d692d89a22357f04ba40ee8a9ed4d79798.tar.gz
add comment
Signed-off-by: sawanoboly <sawanoboriyu@higanworks.com>
-rw-r--r--lib/chef/knife/bootstrap/train_connector.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/knife/bootstrap/train_connector.rb b/lib/chef/knife/bootstrap/train_connector.rb
index 56b644d25d..da5db65de0 100644
--- a/lib/chef/knife/bootstrap/train_connector.rb
+++ b/lib/chef/knife/bootstrap/train_connector.rb
@@ -117,6 +117,9 @@ class Chef
cmd = windows? ? MKTEMP_WIN_COMMAND : MKTEMP_NIX_COMMAND
@tmpdir ||= begin
res = run_command!(cmd)
+ # Since pty is enabled in the connection, stderr to be merged into stdout.
+ # So, there are cases where unnecessary multi-line output
+ # is included before the result of mktemp.
dir = res.stdout.split.last
unless windows?
# Ensure that dir has the correct owner. We are possibly