Closed markekraus closed 4 years ago
Assume you have the following command:
Microsoft.PowerShell.Management\New-Item -Path $Path -ItemType Directory -Force
Running ConvertTo-SplatExpression on that line creates a variable named $microsoft.PowerShell.Management\NewItemSplat which is definitely not a valid variable name.
ConvertTo-SplatExpression
$microsoft.PowerShell.Management\NewItemSplat
Full transformation:
$microsoft.PowerShell.Management\NewItemSplat = @{ Path = $Path ItemType = 'Directory' Force = $true } Microsoft.PowerShell.Management\New-Item @microsoft.PowerShell.Management\NewItemSplat
Fixed with v1.0.0-beta1
Install-Module EditorServicesCommandSuite -Scope CurrentUser -AllowPrerelease -Force
Assume you have the following command:
Running
ConvertTo-SplatExpression
on that line creates a variable named$microsoft.PowerShell.Management\NewItemSplat
which is definitely not a valid variable name.Full transformation: