MISC: Following the same style guide as the rest of the PowerShell scripts.

MISC: Fix indentation.
This commit is contained in:
John Ericson 2018-07-17 23:06:36 +02:00
parent 2fc710be16
commit 5449b7053c
3 changed files with 7 additions and 7 deletions

View File

@ -69,7 +69,7 @@ module VagrantPlugins
"SourcePath" => Vagrant::Util::Platform.wsl_to_windows_path(image_path).gsub("/", "\\"),
"VMName" => env[:machine].provider_config.vmname,
}
options[:disks_config] = add_abs_path(disks_config, env[:machine].data_dir).to_json.to_s.gsub('"', '"""') if disks_config
options[:DisksConfig] = add_abs_path(disks_config, env[:machine].data_dir).to_json.to_s.gsub('"', '"""') if disks_config
env[:ui].detail("Creating and registering the VM...")
@ -83,8 +83,8 @@ module VagrantPlugins
private
def add_abs_path(disks_config, data_dir)
disks_config.each {|controller| controller.each {|disk| disk['name'] = data_dir.join("#{disk['name']}.vhdx").to_s.gsub("/", "\\") if disk['name'] }}
end
end
end
end
end
end

View File

@ -20,7 +20,7 @@ param(
[parameter (Mandatory=$false)]
[switch] $EnableCheckpoints,
[parameter (Mandatory=$false)]
[string] $disks_config=$null
[string] $DisksConfig=$null
)
$ErrorActionPreference = "Stop"

View File

@ -14,7 +14,7 @@ param(
[parameter (Mandatory=$false)]
[string] $VMName=$null,
[parameter (Mandatory=$false)]
[string] $disks_config=$null
[string] $DisksConfig=$null
)
$ErrorActionPreference = "Stop"
@ -74,8 +74,8 @@ function AddDisks($vm, $controller) {
}
}
if ($disks_config) {
$parsed_disks_config = $disks_config | ConvertFrom-Json
$parsed_disks_config | ForEach-Object { AddDisks -vm $VMName -controller $_ }
if ($DisksConfig) {
$ParsedDisksConfig = $DisksConfig | ConvertFrom-Json
$ParsedDisksConfig | ForEach-Object { AddDisks -vm $VMName -controller $_ }
}