From 10ac204c291a151ecb5576d8040dc59787f3d7aa Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Tue, 12 Jun 2018 15:36:14 -0700 Subject: [PATCH] Prevent SMB output from being wrapped --- plugins/hosts/windows/cap/smb.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/hosts/windows/cap/smb.rb b/plugins/hosts/windows/cap/smb.rb index c0ed42a49..402674e36 100644 --- a/plugins/hosts/windows/cap/smb.rb +++ b/plugins/hosts/windows/cap/smb.rb @@ -129,7 +129,7 @@ module VagrantPlugins # # @return [Hash] def self.get_smbshares - result = Vagrant::Util::PowerShell.execute_cmd("Get-SmbShare|Format-List") + result = Vagrant::Util::PowerShell.execute_cmd("Get-SmbShare|Format-List|Out-String -Width 4096") if result.nil? return nil end @@ -151,7 +151,7 @@ module VagrantPlugins # # @return [Hash] def self.get_netshares - result = Vagrant::Util::PowerShell.execute_cmd("net share") + result = Vagrant::Util::PowerShell.execute_cmd("net share | Out-String -Width 4096") if result.nil? return nil end @@ -164,7 +164,7 @@ module VagrantPlugins shares = {} share_names.each do |share_name| shares[share_name] = {} - result = Vagrant::Util::PowerShell.execute_cmd("net share #{share_name}") + result = Vagrant::Util::PowerShell.execute_cmd("net share #{share_name} | Out-String -Width 4096") next if result.nil? result.each_line do |line| key, value = line.strip.split(/\s+/, 2)