Filter clear screen character out of stderr as well

This commit is contained in:
Mitchell Hashimoto 2012-01-19 15:14:11 -08:00
parent 1958446b44
commit 87b03609db
2 changed files with 11 additions and 4 deletions

View File

@ -2,6 +2,7 @@
- Fix `forward_agent` not working when outside of blocks. [GH-651]
- Fix issue causing custom guest implementations to not load properly.
- Filter clear screen character out of output on SSH.
## 0.9.1 (January 18, 2012)

View File

@ -167,13 +167,19 @@ module Vagrant
ch.exec(shell) do |ch2, _|
# Setup the channel callbacks so we can get data and exit status
ch2.on_data do |ch3, data|
# Filter out the clear screen command
data.gsub!("\e[H", "")
yield :stdout, data if block_given?
if block_given?
# Filter out the clear screen command
data.gsub!("\e[H", "")
yield :stdout, data
end
end
ch2.on_extended_data do |ch3, type, data|
yield :stderr, data if block_given?
if block_given?
# Filter out the clear screen command
data.gsub!("\e[H", "")
yield :stderr, data
end
end
ch2.on_request("exit-status") do |ch3, data|