Prevent SMB output from being wrapped
This commit is contained in:
parent
ef4d431d36
commit
10ac204c29
|
@ -129,7 +129,7 @@ module VagrantPlugins
|
||||||
#
|
#
|
||||||
# @return [Hash]
|
# @return [Hash]
|
||||||
def self.get_smbshares
|
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?
|
if result.nil?
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
@ -151,7 +151,7 @@ module VagrantPlugins
|
||||||
#
|
#
|
||||||
# @return [Hash]
|
# @return [Hash]
|
||||||
def self.get_netshares
|
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?
|
if result.nil?
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
@ -164,7 +164,7 @@ module VagrantPlugins
|
||||||
shares = {}
|
shares = {}
|
||||||
share_names.each do |share_name|
|
share_names.each do |share_name|
|
||||||
shares[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?
|
next if result.nil?
|
||||||
result.each_line do |line|
|
result.each_line do |line|
|
||||||
key, value = line.strip.split(/\s+/, 2)
|
key, value = line.strip.split(/\s+/, 2)
|
||||||
|
|
Loading…
Reference in New Issue