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("/", "\\"), "SourcePath" => Vagrant::Util::Platform.wsl_to_windows_path(image_path).gsub("/", "\\"),
"VMName" => env[:machine].provider_config.vmname, "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...") env[:ui].detail("Creating and registering the VM...")
@ -86,5 +86,5 @@ module VagrantPlugins
end end
end end
end end
end end
end end

View File

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

View File

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