DTW-DanWard / PowerShell-Beautifier

A whitespace reformatter and code cleaner for Windows PowerShell and PowerShell Core
MIT License
333 stars 38 forks source link

Set-Variable can replace set where it shouldn't #53

Open c22 opened 4 years ago

c22 commented 4 years ago

When given the input:

netsh int ip set interface $index metric= ($metric + 5)

You end up with:

netsh int ip Set-Variable interface $index metric= ($metric + 5)

stinos commented 4 years ago

Quick fix:

$psBeautify = Get-Module PowerShell-Beautifier
$psBeautify.PrivateData.ValidCommandNames.Remove('set')